cookedwaffles_

create me a plugin that works for 1.21.11. make the plugin create fakeplayers that act like real players. make them chat and do things that make them a real player. include other fake players on the tablist (fill up the tab list) and make the fake players be able to leave and rejoin.

Kodari AI
KodariFeb 14 at 12:40 am 13,208 (v2)

I’ll create a comprehensive fake player system that simulates real players with chat, tablist presence, and join/leave cycles.

FakePlayerSystem
Creates realistic fake players that appear on the tab list, chat, move around, and perform actions to simulate real players. Includes automated join/leave cycles, random chat messages, and configurable behaviors to make servers appear more populated. Features customizable player names, chat patterns, and activity schedules.

Plugin created! FakePlayerSystem generates realistic fake players that:

Core Features:

  • Appear on the tab list with dynamic ping (20-100ms)

  • Send chat messages from configurable pools (greetings, questions, statements, reactions)

  • Respond to real player messages intelligently

  • Join and leave automatically with customizable delays

  • Show join/quit messages

  • Maintain realistic player counts (min/max settings)

Commands:

  • /fp add [count] - Add fake players

  • /fp remove [name] - Remove specific/random fake player

  • /fp list - List all fake players

  • /fp clear - Remove all fake players

  • /fp reload - Reload configs

  • /fp info - Show plugin stats

Configuration:

  • Customizable player names with prefixes/suffixes

  • Chat message categories (greetings, questions, statements, reactions, farewells)

  • Auto-spawn settings with random delays

  • Tablist update intervals and ping ranges

  • Join/leave message formatting

Requires ProtocolLib for full tab list functionality. Without it, basic chat features still work.

cookedwaffles_

can you make them appear on tablist

Kodari AI
KodariFeb 14 at 12:45 am 10,430 (v2)

I’ll read the relevant files to understand the current implementation and then modify the TablistManager to add fake players to the tablist.

Let me check the config files to see if tablist is enabled:

Looking at the code, the tablist functionality is already implemented but requires ProtocolLib to work. The fake players should appear on the tablist if ProtocolLib is installed and use-tablist: true in the config (which it already is).

However, I’ll enhance the implementation to ensure it works more reliably and add better error handling:

The fake players are now configured to appear on the tablist. Here’s what you need to know:

Requirements:

  1. ProtocolLib must be installed - This is essential for tablist functionality

  2. use-tablist: true in config.yml (already enabled)

What I improved:

  1. Added better error messages if ProtocolLib is missing

  2. Added skin texture support (will use default Steve/Alex skin if not set)

  3. Improved thread safety for packet sending

  4. Added debug logging to confirm when players are added to tablist

To verify it’s working:

  1. Ensure ProtocolLib is installed on your server

  2. Reload/restart the plugin

  3. Check console for “Added [name] to tablist” messages

  4. Press TAB in-game to see the fake players

If ProtocolLib is not installed, you’ll see a clear warning message on startup.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
15 1,210
src/main/java/com/fakeplayer/FakePlayerPlugin.java
package com.fakeplayer;

import com.fakeplayer.commands.FakePlayerCommand;
import com.fakeplayer.managers.BehaviorManager;
import com.fakeplayer.managers.ChatManager;
import com.fakeplayer.managers.ConfigManager;
import com.fakeplayer.managers.FakePlayerManager;
import com.fakeplayer.managers.PacketManager;
import com.fakeplayer.managers.TablistManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class FakePlayerPlugin extends JavaPlugin {

    private ConfigManager configManager;
    private FakePlayerManager fakePlayerManager;
    private PacketManager packetManager;
    private TablistManager tablistManager;
    private ChatManager chatManager;
    private BehaviorManager behaviorManager;

    @Override
    public void onEnable() {
        if (!checkProtocolLib()) {
            getLogger().severe("============================================");
            getLogger().severe("  ProtocolLib NOT FOUND!");
            getLogger().severe("  Fake players will NOT appear on tablist");
            getLogger().severe("  Please install ProtocolLib for full functionality");
            getLogger().severe("============================================");
        } else {
            getLogger().info("ProtocolLib detected - Tablist features enabled!");
        }

        configManager = new ConfigManager(this);
        configManager.loadConfigs();

        packetManager = new PacketManager(this);
        tablistManager = new TablistManager(this);
        chatManager = new ChatManager(this);
        behaviorManager = new BehaviorManager(this);
        fakePlayerManager = new FakePlayerManager(this);

        getCommand("fakeplayer").setExecutor(new FakePlayerCommand(this));

        if (configManager.isAutoSpawnOnStart()) {
            Bukkit.getScheduler().runTaskLater(this, () -> {
                fakePlayerManager.spawnInitialPlayers();
            }, 40L);
        }

        fakePlayerManager.startAutoSpawnTask();
        chatManager.startChatTask();
        behaviorManager.startBehaviorTask();
        tablistManager.startUpdateTask();

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

    @Override
    public void onDisable() {
        if (fakePlayerManager != null) {
            fakePlayerManager.removeAllFakePlayers();
        }
        getLogger().info("FakePlayerSystem has been disabled!");
    }

    private boolean checkProtocolLib() {
        return Bukkit.getPluginManager().getPlugin("ProtocolLib") != null;
    }

    public boolean hasProtocolLib() {
        return checkProtocolLib();
    }
}