Build the new ScriptBot Minecraft plugin project as a complete Paper 1.21.11 (Java 21, Maven) plugin. Implement the user's full requested scope: /bot spawn|remove|list|stop|start|kill|tp|follow|attack|defend|skin|sit|jump|look|menu; /botscript create|record|stop|play|delete|list; operator or scriptbot.admin authorization; tab completion and clear errors; a usable click-driven menu; YAML-persisted bot configuration and saved action sequences; configurable bot names/skins, guard/flee/coordinated action support, scripted playback/recording, fighting player/bot targets, movement/sprint/jump/crouch, shield/item/armor handling as technically feasible, health/death and respawn control, skin lookup/copy, and performance-conscious ticking. Include complete source, Maven pom, plugin.yml, README installation/setup instructions, and practical example scripts/config.

Non-negotiable: do NOT substitute zombies, mobs, armor stands, or ordinary Citizens-style NPCs. The bots must be real server-side Minecraft player entities (ServerPlayer or an equally genuine implementation), visible as player entities to normal unmodded clients. Prefer a reliable fake-player library only if it truly supplies actual server player entities. Investigate Paper 1.21.11-compatible options/dependencies and use the approach that can compile for this target; explain any unavoidable feature/API limitations candidly in README rather than claiming unsupported behavior. Keep the project Maven-based and Java 21. Ensure plugin commands, descriptors, and dependency setup agree. Do not add tests or test files, and do not attempt to run Maven/compile; the workspace will compile the project after your changes. Finish with a concise report of implemented functionality and any known limitations.

Kodari AI
KodariNov 15 at 6:03 pm 2
ScriptBot
ScriptBot is a Paper 1.21.11 plugin that spawns real server-side player entities as controllable bots. It provides comprehensive bot management via /bot commands including spawn, remove, list, stop, start, kill, teleport, follow, attack, defend, skin, sit, jump, look, and an interactive menu. Scripted automation through /botscript enables recording and playback of action sequences with YAML persistence. Features configurable bot names, skins, guard/flee behavior, coordinated actions, combat targeting, movement controls, and health management. Operator or scriptbot.admin permission required for all commands. Includes tab completion, clear error messages, and performance-conscious ticking.
  1. Build the Java 21 Maven plugin structure, commands, permissions, configuration, and setup guide.

  2. Implement persistent bot management, recording/playback, and the click-driven menu.

  3. Create genuine ServerPlayer entities through isolated reflective NMS access; document the runtime-specific and behavioral limits.

Implemented the ScriptBot Java 21 Maven project for Paper 1.21.11, including commands and tab completion, admin permissions, a click-driven menu, YAML-persisted bot settings and scripts, recording/playback, equipment controls, behavior modes, and example configuration and setup instructions.

Bots are created as native ServerPlayer entities through reflective NMS access—not as mobs, armor stands, or packet-only fakes. Limitations: Paper has no supported public API for creating these entities, so NMS changes can break spawning. Because bots do not complete a normal login handshake, tab-list and skin behavior and compatibility with plugins expecting connected players may vary. Their movement uses velocity rather than pathfinding; sitting and shield behavior are approximations.

Maven compilation was not run, as requested.

Improve the existing ScriptBot project for the user request: “MAKE BOT LIKE REAL PEOPLE SO I CAN TP THEM TO ME SEE THEM AND MOR”. Read the current code and make the existing native ServerPlayer fake bots reliably visible to ordinary unmodded Paper 1.21.11 clients, teleportable to the command sender, and more lifelike. Current FakePlayerFactory constructs a ServerPlayer and adds it with ServerLevel.addFreshEntity, but does not visibly ensure player-info/profile synchronization for client rendering; /bot tp <name> already exists via BotManager.teleportTo. Audit the actual implementation carefully, do not assume the existing feature is working.

Priority requirements:

  1. Fix client visibility: use correctly ordered player-info/profile and entity spawn synchronization for each relevant online viewer so the bot renders as a player model and its copied skin can load; handle tracker/spawn ordering and cleanup on bot removal/death/re-spawn/shutdown. Do not add bots as online Bukkit players or fake them with a mob, armor stand, or packet-only entity. Make sure late-joining players can see existing bots and ensure clients do not retain stale tab/profile entries. Use isolated reflective NMS compatible with the project's Paper 1.21.11 target; inspect mappings/dependencies already in pom. If reliable per-viewer sync is impossible using safe reflection, document the exact limitation and favor correct native server entity tracking rather than risky broken packets.
  2. Verify and fix /bot tp <name> so it teleports the actual bot to the invoking player, including unloaded/world/cross-world concerns as practical, updates persisted location, and clearly errors when sender is console or bot unavailable. Ensure bot is visible after teleport.
  3. Add practical “real person” polish using existing bot behavior system: natural looking/turning, walking/sprinting/jumping/crouching, following/guard/flee, combat interactions, and equipment/skin persistence where possible. Focus on visible actions and avoid expensive per-bot high-frequency tasks. Do not claim full vanilla player AI/login behavior if not implemented.
  4. Update README with exact command examples and honest, short limitations: these are native ServerPlayer entities but not logged-in humans; Paper/NMS fragility, client/tab/skin/plugin compatibility caveats, and real behavior limitations. Existing user's “and more” is unspecified: do not make risky scope assumptions; implement the concrete visibility/teleport/lifelike request above and note what additional behavior can be added if user clarifies.

Keep Java 21 Maven and Paper 1.21.11, preserve existing command and permission behavior, do not add tests/test files, and do not run Maven/compile. Deliver code/docs only, then report the concrete fixes and known limitations.

Kodari AI
KodariNov 15 at 7:23 pm 2
  1. Audit the native player creation, lifecycle, teleport, and current behavior code.

  2. Fix viewer synchronization and bot lifecycle/teleport, then polish visible behavior within the existing design.

  3. Update README with exact usage examples and clear compatibility limits.

Updated ScriptBot to synchronize bot profile/player-info data before native entity tracking, resync profiles for joining players, and remove profile entries on bot removal, death, respawn, skin replacement, and shutdown. Entity spawning still uses Paper’s native tracker—not packet-only entities.

/bot tp <name> now teleports the actual bot to the sender across worlds, checks teleport/spawn failures, and saves the resulting location. Behavior turning uses rotation updates instead of teleporting every tick, and duplicate death handling is guarded.

README now includes command examples and limitations: bots are native ServerPlayer entities but not logged-in players; NMS, skin/tab behavior, plugin compatibility, pathfinding, and combat remain limited or build-sensitive.

Maven compilation was not run, as requested.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
README.md
Code
13 1,651
src/main/java/com/kodari/scriptbot/ScriptBotPlugin.java
package com.kodari.scriptbot;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;

public final class ScriptBotPlugin extends JavaPlugin implements Listener {
    private BotManager botManager;
    private ScriptManager scriptManager;
    private BotMenu botMenu;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("bots.yml", false);
        saveResource("scripts.yml", false);
        botManager = new BotManager(this);
        scriptManager = new ScriptManager(this, botManager);
        botMenu = new BotMenu(botManager);
        botManager.load();
        scriptManager.load();
        Bukkit.getPluginManager().registerEvents(this, this);
        Bukkit.getPluginManager().registerEvents(botMenu, this);
        BotCommand executor = new BotCommand(this, botManager, scriptManager, botMenu);
        getCommand("bot").setExecutor(executor);
        getCommand("bot").setTabCompleter(executor);
        getCommand("botscript").setExecutor(executor);
        getCommand("botscript").setTabCompleter(executor);
        long period = Math.max(1L, getConfig().getLong("tick-period", 5L));
        Bukkit.getScheduler().runTaskTimer(this, botManager::tick, period, period);
        Bukkit.getScheduler().runTaskTimer(this, scriptManager::tickRecording, 10L, 10L);
        getLogger().info("ScriptBot enabled. NMS player-entity support is targeted at Paper 1.21.11.");
    }

    @EventHandler
    public void onBotDeath(PlayerDeathEvent event) {
        Player player = event.getEntity();
        if (botManager.getBots().stream().anyMatch(bot -> bot.getId().equals(player.getUniqueId()))) {
            event.setKeepInventory(true);
            event.setKeepLevel(true);
            event.getDrops().clear();
            event.setDroppedExp(0);
            botManager.handleDeath(player);
        }
    }

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        botManager.syncViewer(event.getPlayer());
        Bukkit.getScheduler().runTask(this, () -> {
            if (event.getPlayer().isOnline()) botManager.syncViewer(event.getPlayer());
        });
    }

    @Override
    public void onDisable() {
        if (scriptManager != null) scriptManager.stopAll();
        if (botManager != null) botManager.save();
        if (botManager != null) botManager.shutdown();
    }
}