greatestbanana13

Make this plugin hide author dexer , command /hide , /dexerhide reload the plugin obfuscates your username using packetevents api and changes your skin to the texture url in the config

Kodari AI
KodariJan 11 at 2:04 pm 5,274 (v2)

I’ll create a plugin that obfuscates player usernames and changes their skin using PacketEvents.

DexerHide
A player obfuscation plugin that hides usernames and changes player skins using PacketEvents API. Players can toggle their visibility with /hide command, while administrators can reload configuration using /dexerhide reload. Features customizable skin textures and complete identity masking through packet manipulation for enhanced privacy and anonymity.

Plugin created! Features:

  • /hide - Toggles identity obfuscation (requires reconnect)

  • /dexerhide reload - Reloads configuration

  • PacketEvents integration for username and skin manipulation

  • Configurable skin texture URL and obfuscated name format

  • Author credit to “dexer”

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
10 351
src/main/java/com/dexer/hide/DexerHide.java
package com.dexer.hide;

import com.github.retrooper.packetevents.PacketEvents;
import io.github.retrooper.packetevents.factory.spigot.SpigotPacketEventsBuilder;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public class DexerHide extends JavaPlugin {

    private static DexerHide instance;
    private final Map<UUID, PlayerHideData> hiddenPlayers = new HashMap<>();

    public static DexerHide getInstance() {
        return instance;
    }

    public Map<UUID, PlayerHideData> getHiddenPlayers() {
        return hiddenPlayers;
    }

    @Override
    public void onLoad() {
        PacketEvents.setAPI(SpigotPacketEventsBuilder.build(this));
        PacketEvents.getAPI().load();
    }

    @Override
    public void onEnable() {
        instance = this;

        saveDefaultConfig();

        PacketEvents.getAPI().init();

        // Register the listener. Use the file you added (V1 or V2).
        // If you installed PacketEvents v1.x, register HidePacketListenerV1
        // If you installed PacketEvents v2.x, register HidePacketListenerV2
        // Example for v1:
        // PacketEvents.getAPI().getEventManager().registerListener(new HidePacketListenerV1());
        // Example for v2:
        // PacketEvents.getAPI().getEventManager().registerListener(new HidePacketListenerV2());

        // Replace the line below with the appropriate listener instantiation before building:
        // (uncomment one of the two lines according to your PacketEvents version)
        // PacketEvents.getAPI().getEventManager().registerListener(new HidePacketListenerV1());
        // PacketEvents.getAPI().getEventManager().registerListener(new HidePacketListenerV2());

        getCommand("hide").setExecutor(new HideCommand());
        getCommand("dexerhide").setExecutor(new DexerHideCommand());

        getLogger().info("DexerHide has been enabled!");
    }

    @Override
    public void onDisable() {
        if (PacketEvents.getAPI() != null) {
            PacketEvents.getAPI().terminate();
        }

        hiddenPlayers.clear();
        getLogger().info("DexerHide has been disabled!");
    }

    /**
     * Called by DexerHideCommand when /dexerhide reload is executed.
     */
    public void reloadConfiguration() {
        reloadConfig();
        getLogger().info("Configuration reloaded!");
    }
}