envix1ty_000

1.21.11 spigot plugin that makes invisible players disappear from the player/tab list make it optimized and simple to turn the plugin on and off with the command /realinvis off and /realinvis on

Kodari AI
KodariJan 17 at 1:36 am 4,626 (v2)

I’ll create a lightweight plugin that hides invisible players from the tab list with toggle commands.

RealInvis
A lightweight Spigot plugin that automatically hides players with invisibility effects from the tab list. Features simple toggle commands to enable or disable the functionality. Optimized for performance with minimal overhead and clean integration with vanilla invisibility mechanics.

Plugin created! Features:

  • Auto-hides invisible players from tab list when they get invisibility effect

  • Auto-shows them when effect expires

  • /realinvis on - Enable functionality

  • /realinvis off - Disable functionality

  • realinvis.bypass permission to stay visible even when invisible

  • Optimized with delayed tasks to prevent race conditions

  • Tab completion support

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
6 273
src/main/java/com/realinvis/RealInvis.java
package com.realinvis;

import com.realinvis.command.RealInvisCommand;
import com.realinvis.listener.InvisibilityListener;
import lombok.Getter;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

public class RealInvis extends JavaPlugin {
    
    @Getter
    private static RealInvis instance;
    
    @Getter
    private boolean enabled;
    
    @Override
    public void onEnable() {
        instance = this;
        
        saveDefaultConfig();
        loadConfiguration();
        
        getServer().getPluginManager().registerEvents(new InvisibilityListener(this), this);
        getCommand("realinvis").setExecutor(new RealInvisCommand(this));
        
        getLogger().info("RealInvis enabled! Status: " + (enabled ? "Active" : "Disabled"));
    }
    
    @Override
    public void onDisable() {
        getLogger().info("RealInvis disabled!");
    }
    
    public void loadConfiguration() {
        FileConfiguration config = getConfig();
        this.enabled = config.getBoolean("enabled", true);
    }
    
    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
        getConfig().set("enabled", enabled);
        saveConfig();
    }
}