H

add a command that gets rid of my name on the server tablist and gets rid of my name above my player so people cant see it

Kodari AI
KodariJan 9 at 8:21 pm 2,805 (v2)

I’ll create a plugin that hides your name from both the tablist and above your player.

NameHider
A lightweight plugin that allows players to hide their name from the server tablist and their nametag above their head. Uses a simple toggle command to enable or disable name visibility. Features persistent state tracking and scoreboard team management for complete name concealment.

Plugin created! Use /hidename to toggle your name visibility. The command:

  • Removes your name from the tablist

  • Hides your nametag above your player

  • Toggle it again to show your name

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
5 118
src/main/java/com/namehider/NameHiderPlugin.java
package com.namehider;

import org.bukkit.plugin.java.JavaPlugin;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

public class NameHiderPlugin extends JavaPlugin {
    
    private final Set<UUID> hiddenPlayers = new HashSet<>();
    
    @Override
    public void onEnable() {
        getCommand("hidename").setExecutor(new HideNameCommand(this));
    }
    
    public Set<UUID> getHiddenPlayers() {
        return hiddenPlayers;
    }
}