ultimatesetups

Create me a 1.21.4 Player Spoofer plugin that fully works with Paper server jars

Kodari AI
KodariJan 14 at 5:30 pm 7,695 (v2)

I’ll create a fully functional Player Spoofer plugin for Paper 1.21.4.

PlayerSpoofer
A comprehensive player spoofing plugin for Paper servers that allows players to disguise themselves with custom names and skins. Features include real-time name spoofing, skin customization using player usernames or textures, permission-based access control, and tab list integration. Supports commands for toggling spoofs, setting custom names, and applying player skins. Includes persistent spoof storage and admin override capabilities.

PlayerSpoofer plugin created successfully!

Features included:

  • Name spoofing with display name and tab list updates

  • Skin spoofing using XSeries Profileable (supports player names, UUIDs, textures, base64)

  • Persistent storage saves spoofs between restarts

  • Admin commands to spoof other players

  • Permission system with bypass protection

  • Auto-restore on player join

  • Full Paper 1.21.4 compatibility

Commands:

  • /spoof name <fakename> - Change your display name

  • /spoof skin <player|texture> - Change your skin

  • /spoof reset - Reset all spoofs

  • /spoofadmin <player> <name|skin|reset> [value] - Admin spoof controls

Build with: ./gradlew build (output in build/libs/)

ultimatesetups

I want it to add fakeplayers to the server

Kodari AI
KodariJan 14 at 5:33 pm 5,444 (v2)

I’ll read the project files to understand the current implementation and then add fake player functionality.

Now I’ll add fake player functionality to the plugin. I’ll create:

  • FakePlayer model to store fake player data

  • FakePlayerManager to handle fake player creation/removal

  • Commands to manage fake players

  • Update config with fake player settings

ultimatesetups

I want it to work like AsteroidSpoofer plugin for builtbybit

Kodari AI
KodariJan 14 at 5:35 pm 12,915 (v2)

I’ll read the AsteroidSpoofer documentation and current implementation to align the functionality.

Based on the AsteroidSpoofer API documentation, I need to completely rewrite this plugin to use the AsteroidAPI for creating actual fake player entities (NPCs) instead of just changing display names/skins. The current implementation is a simple disguise plugin, but AsteroidSpoofer creates actual fake player entities that can move, perform actions, and behave like real players.

Plan:

  • Integrate AsteroidAPI dependency

  • Create fake player entities using FakePlayerEntity

  • Add spawn/despawn commands for fake players

  • Add action system (walking, looking, mining, etc.)

  • Store fake player data with actions and behaviors

  • Add admin controls for managing fake players

ultimatesetups

Create a maven pom.xml for this plugin

Kodari AI
KodariJan 14 at 5:37 pm 3,427 (v2)

I’ll read the existing build.gradle and manifest.kod to understand the project configuration, then create an equivalent Maven pom.xml.

Created pom.xml with Maven configuration matching the existing Gradle build. The pom includes all repositories, dependencies (Spigot API, Lombok, XSeries), Java 21 toolchain, and resource filtering for plugin.yml version replacement.

ultimatesetups

Remove Gradle make it totally Maven Project

Kodari AI
KodariJan 14 at 5:45 pm 2,863 (v2)

I’ll convert this project to Maven-only by removing Gradle files and ensuring pom.xml has all necessary dependencies.

I’ll remove Gradle files and update the manifest.kod to remove xseries (since XSeries is already in pom.xml dependencies).

The project is now Maven-only. I’ve:

  • Deleted build.gradle

  • Updated manifest.kod to remove xseries (already in pom.xml as a dependency)

  • pom.xml already contains all necessary dependencies and configuration

You can now build with: mvn clean package

Kodari can make mistakes. Review important code before using.
Files
src
manifest.kod
pom.xml
Code
10 784
src/main/java/com/playerspoofer/PlayerSpoofer.java
package com.playerspoofer;

import com.playerspoofer.commands.FakePlayerCommand;
import com.playerspoofer.listeners.FakePlayerListener;
import com.playerspoofer.managers.FakePlayerManager;
import lombok.Getter;
import me.serbob.asteroidapi.AsteroidAPI;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.io.IOException;

@Getter
public class PlayerSpoofer extends JavaPlugin {

    private FakePlayerManager fakePlayerManager;
    private FileConfiguration dataConfig;
    private File dataFile;
    private AsteroidAPI asteroidAPI;

    @Override
    public void onEnable() {
        if (!loadAsteroidAPI()) {
            getLogger().severe("AsteroidSpoofer is required for this plugin to work!");
            getLogger().severe("Download it from: https://builtbybit.com/resources/asteroidspoofer.36008/");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        saveDefaultConfig();
        loadDataConfig();
        
        this.fakePlayerManager = new FakePlayerManager(this);
        
        registerCommands();
        registerListeners();
        
        getLogger().info("PlayerSpoofer has been enabled!");
        getLogger().info("Using AsteroidAPI version: " + getServer().getPluginManager().getPlugin("AsteroidSpoofer").getDescription().getVersion());
    }

    @Override
    public void onDisable() {
        if (fakePlayerManager != null) {
            fakePlayerManager.removeAllFakePlayers();
            if (getConfig().getBoolean("settings.save-on-shutdown", true)) {
                fakePlayerManager.saveAllFakePlayers();
            }
        }
        getLogger().info("PlayerSpoofer has been disabled!");
    }

    private boolean loadAsteroidAPI() {
        if (getServer().getPluginManager().getPlugin("AsteroidSpoofer") == null) {
            return false;
        }
        
        try {
            this.asteroidAPI = AsteroidAPI.getInstance();
            return asteroidAPI != null;
        } catch (Exception e) {
            getLogger().severe("Failed to load AsteroidAPI: " + e.getMessage());
            return false;
        }
    }

    private void registerCommands() {
        getCommand("fakeplayer").setExecutor(new FakePlayerCommand(this));
    }

    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new FakePlayerListener(this), this);
    }

    private void loadDataConfig() {
        dataFile = new File(getDataFolder(), "data.yml");
        if (!dataFile.exists()) {
            try {
                dataFile.createNewFile();
            } catch (IOException e) {
                getLogger().severe("Could not create data.yml!");
                e.printStackTrace();
            }
        }
        dataConfig = YamlConfiguration.loadConfiguration(dataFile);
    }

    public void saveDataConfig() {
        try {
            dataConfig.save(dataFile);
        } catch (IOException e) {
            getLogger().severe("Could not save data.yml!");
            e.printStackTrace();
        }
    }

    public void reloadDataConfig() {
        dataConfig = YamlConfiguration.loadConfiguration(dataFile);
    }

    public String getMessage(String path) {
        return getConfig().getString("messages." + path, "&cMessage not found: " + path)
                .replace("&", "§");
    }

    public String getPrefix() {
        return getConfig().getString("prefix", "&6[&eFakePlayer&6] &r").replace("&", "§");
    }
}