confide213

Make a plugin where a players username and nametag shows as obfuscated text or cursed text in tab and when they type with /anonymous (player name)

Kodari AI
KodariMay 21 at 5:30 pm 12,537 (v2)

I’ll create a plugin that allows toggling anonymous mode for players, displaying their username and nametag as obfuscated text in tab, chat, and above their head.

AnonymousPlayer
A plugin that allows players to appear anonymous with obfuscated usernames and nametags. Use /anonymous to toggle anonymous mode for yourself or specify a player name to toggle it for others. When active, the player's name appears as scrambled obfuscated text in chat, tab list, and above their head. Supports configurable obfuscation styles and permission-based controls for managing anonymous players.

Created AnonymousPlayer plugin!

Features:

  • /anonymous to toggle anonymous mode for yourself

  • /anonymous <player> to toggle for others (requires permission)

  • Obfuscated names appear in chat, tab list, and above player heads

  • Two obfuscation styles: MAGIC (§k scrambled text) or CURSED (Unicode zalgo characters)

  • Configurable messages and obfuscation settings

  • Persists anonymous state across chat messages

How it works:

  • Uses scoreboard teams for nametag obfuscation

  • Modifies display name and player list name for tab list

  • Chat listener replaces player names with obfuscated text

  • Supports permission-based controls

confide213

make it so their chat messages appear unobfuscated

redz213

Make it so that their nametags appear obfuscated aswell, but make it so that their chat messages do not appear obfuscated. make it so that you can toggle if anonymous players have glowing with /anonymous glowing on or /anonymous glowing off

Add a command called /book release that broadcast coordinates. That broadcasts in the chat globally this message

<!> A book Has been released at (Coordinates) make the message configurable in console.

Kodari AI
KodariJun 4 at 3:08 am 19

Here’s my plan:

  1. Remove chat obfuscation (delete ChatListener logic)

  2. Fix nametag to show only obfuscated prefix, hiding real name via team

  3. Add glowing toggle via /anonymous glowing on/off

  4. Add /book release command that broadcasts configurable coordinates message

  5. Update plugin.yml and config.yml

Let’s execute all changes:

Now rewrite AnonymousManager to fix nametag (hide real name, only show obfuscated prefix) and add glowing support:The file uses different Unicode escapes. I’ll use <update> instead:

Now update AnonymousCommand to handle the glowing subcommand:

Now create the BookCommand:

Delete the now-unused ChatListener:


Here’s a summary of every change:

Nametags — The scoreboard team now sets NAME_TAG_VISIBILITY to NEVER, completely hiding the real username above the player’s head. The obfuscated name is shown purely via the team prefix. Chat messages are untouched (ChatListener deleted).

Glowing — /anonymous glowing on / /anonymous glowing off toggles glowing for all current and future anonymous players. The setting persists in config.yml.

/book release — Broadcasts a globally configurable message with the sender’s coordinates. Edit book-release-message in config.yml:

YAML
book-release-message: "&6<!> &eA book has been released at &f({x}, {y}, {z})"

Placeholders: {x} {y} {z}. When run from console, coordinates default to 0, 0, 0.

redz213

when a book is released make it play the sound of an amethyst block

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
8 461
src/main/java/com/anonymous/player/AnonymousPlugin.java
package com.anonymous.player;

import com.anonymous.player.commands.AnonymousCommand;
import com.anonymous.player.commands.BookCommand;
import com.anonymous.player.listeners.JoinListener;
import com.anonymous.player.manager.AnonymousManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class AnonymousPlugin extends JavaPlugin {
    
    private AnonymousManager anonymousManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.anonymousManager = new AnonymousManager(this);
        
        getCommand("anonymous").setExecutor(new AnonymousCommand(this));
        getCommand("book").setExecutor(new BookCommand(this));
        
        getServer().getPluginManager().registerEvents(new JoinListener(this), this);
        
        getLogger().info("AnonymousPlayer has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (anonymousManager != null) {
            anonymousManager.clearAll();
        }
        getLogger().info("AnonymousPlayer has been disabled!");
    }
}