Server Bots โ Complete PaperMC Plugin Development Prompt Overview Develop a fully functional, production-ready PaperMC plugin named Server Bots.
The plugin should allow server administrators to spawn and control fake player bots that behave as closely as possible to real online Minecraft players.
The plugin must support PaperMC 1.21.8 through 1.21.11, be written in Java, use Gradle (preferred) or Maven, compile without errors, and contain no placeholder methods, TODOs, or unfinished features.
If any requested feature cannot be implemented using only the Paper API, use NMS (Net Minecraft Server) and packet-based implementations compatible with PaperMC 1.21.8โ1.21.11.
General Requirements Plugin Name: Server Bots Plugin JAR Name: Server Bots.jar Supported Versions:
PaperMC 1.21.8 PaperMC 1.21.9 PaperMC 1.21.10 PaperMC 1.21.11 Language: Java Build System: Gradle (preferred) or Maven Clean, modular, optimized, and well-commented code.
Production-ready project.
No memory leaks.
Efficient scheduler usage.
Unlimited bot support.
Fully compilable project.
Goal The bots should behave as closely as technically possible to genuine online Minecraft players.
They should:
Look like real players.
Use GameProfiles.
Have inventories.
Have animations.
Appear in the TAB player list.
Support skins.
Support vanilla player targeting where technically possible.
Broadcast normal Minecraft join/leave messages.
Support being kicked and banned.
Support multiple bots simultaneously.
Bot Names Bot names can be any valid Minecraft username, including usernames that do not belong to an existing Minecraft account.
Examples:
Dream Technoblade Steve Alex hehehjsgrdj Bot123 TestBot RandomPlayer99 If the provided name belongs to a real Minecraft account:
Automatically download and apply that player's skin.
If the provided name does not belong to an existing Minecraft account:
Spawn the bot successfully using the default Steve skin.
Do not reject the name simply because the account does not exist.
The only restrictions should be Minecraft's normal username rules (length and valid characters).
Root Command /sbot Implement full tab completion for every subcommand and argument.
Spawn Bot Command: /sbot spawn <botName> Behavior:
Spawn a fake player with the specified name.
Spawn in Creative Mode.
Prevent duplicate bot names.
Use the real skin if the username exists.
Otherwise use Steve skin.
Give every bot:
Inventory Collision Animations Head movement Body rotation Proper GameProfile The bot should behave like a connected player.
When the bot spawns:
Broadcast the standard Minecraft join message.
Example:
Dream joined the game or hehehjsgrdj joined the game The bot should also:
Appear in the TAB player list.
Look exactly like a real online player.
Vanilla Command Integration Bots should behave like players wherever technically possible.
Their names should appear in vanilla command player suggestions while typing commands such as: /gamemode survival <bot> /gamemode creative <bot> /tp <bot> /kill <bot> /effect give <bot> /clear <bot> /give <bot> /xp add <bot> The goal is for the bots to be selectable in vanilla commands just like real online players whenever technically possible.
Look Feature Command: /sbot look <botName> Toggle behavior:
First execution:
Enable.
Second execution:
Disable.
When enabled:
The bot continuously rotates its head and body to look at the player who executed the command.
Tracking should be smooth.
Right Click Command: /sbot right_click <count> <intervalTicks> <botName> Parameters: count 0 = infinite Positive integer = total clicks intervalTicks Delay in Minecraft ticks.
Behavior:
Toggle ON/OFF.
When enabled:
Repeatedly perform right-click actions.
Automatically stop after the specified count.
If count equals 0:
Continue forever.
Running the command again disables it.
Left Click Command: /sbot left_click <count> <intervalTicks> <botName> Exactly the same as right_click except using left-click actions.
Toggle ON/OFF.
Drop Commands Commands: /sbot drop_single <item> <botName> /sbot drop_stack <item> <botName> Behavior:
The bot drops items from its inventory. drop_single Drop exactly one item. drop_stack Drop the entire stack.
Requirements:
Only suggest inventory items currently inside that bot.
Remove dropped items from inventory.
Display an error if the item doesn't exist.
Leave On Death Commands: /sbot leave_on_death all /sbot leave_on_death <botName> Toggle ON/OFF.
Specific Bot:
Bot permanently leaves when it dies.
All:
Apply to every current and future bot.
Running the command again disables the feature.
Join & Leave Messages Bots should broadcast Minecraft's normal join and leave messages.
When spawned:
Example:
Dream joined the game or hehehjsgrdj joined the game When leaving:
Example:
Dream left the game or hehehjsgrdj left the game Broadcast the normal leave message whenever a bot:
Dies (if leave_on_death is enabled) Is kicked Is banned Is removed Disconnects Use the server's normal formatting whenever possible.
Kick & Ban Support Where technically possible:
The following commands should work normally: /kick <botName> /ban <botName> Kick:
Remove the bot.
Broadcast the leave message.
Ban:
Remove the bot.
Broadcast the leave message.
Prevent spawning another bot with that name until it has been unbanned.
Toggle System These commands should all behave as toggles: /sbot look /sbot right_click /sbot left_click /sbot leave_on_death Running the exact same command again disables the feature.
Each bot stores its own settings independently.
Multiple Bot Support Support unlimited bots.
Every bot has independent:
Inventory Scheduler tasks Settings Feature states Bots must never interfere with each other.
Tab Completion Implement intelligent tab completion.
For /sbot Show all subcommands.
For bot names Show all currently spawned bots.
For items Only suggest items inside the selected bot's inventory.
For numbers Provide sensible examples.
Performance The plugin should:
Be highly optimized.
Avoid unnecessary repeating tasks.
Cancel tasks when bots leave.
Prevent memory leaks.
Scale smoothly with many bots.
Maintain good TPS.
Error Handling Display clear messages for:
Bot not found Duplicate bot name Invalid username format Invalid syntax Invalid interval Invalid click count Item not found Item missing from inventory Bot already banned Permissions Permission: serverbots.admin Only operators or players with this permission may use the plugin.
Technical Requirements Proper GameProfile implementation.
Automatically download skins for existing Minecraft accounts.
Use the Steve skin for non-existent usernames.
Allow arbitrary valid Minecraft usernames (including random names that have never existed).
Inventories.
Animations.
Head and body rotation.
Appearance in the TAB player list.
Vanilla command player suggestions wherever technically possible.
Standard Minecraft join and leave messages.
Kick and ban support wherever technically possible.
Modern Paper API practices.
NMS and packets where necessary.
Deliverables Provide a complete project containing:
Complete Java source code.
Fully working Gradle project (preferred). plugin.yml.
Proper package structure.
All commands fully implemented.
Full tab completion.
No placeholder methods.
No TODO comments.
No missing classes.
Fully compilable on PaperMC 1.21.8โ1.21.11.
Production-ready quality.
Final Objective The finished plugin should create fake players that are nearly indistinguishable from real online players. Bots should support both real and random valid Minecraft usernames, automatically use real skins when available (or the default Steve skin otherwise), appear in the TAB list, broadcast standard Minecraft join and leave messages, participate in vanilla player-targeting commands and player suggestions wherever technically possible, maintain independent inventories and behaviors, and provide every /sbot management feature described above in a stable, optimized, production-ready implementation.
The compilation failed with this error:
Compilation failed with 1 error(s):
ERROR in src/main/java/com/kodari/serverbots/util/MessageUtil.java at line 28: reached end of file while parsing
}
^
=== COMPILATION ERROR ANALYSIS ===
FILES TO INVESTIGATE:
- src/main/java/com/kodari/serverbots/util/MessageUtil.java
Please fix this error by creating a new artifact with the corrected code.
Give the plugin file
name: ServerBots
version: '1.0.0'
main: com.kodari.serverbots.ServerBotsPlugin
api-version: '1.21'
author: Kodari
description: Creates and controls configurable server bot proxies.
prefix: Server Bots
commands:
sbot:
description: Manage Server Bots
usage: /sbot <subcommand>
permission: serverbots.admin
aliases:
- serverbots
permissions:
serverbots.admin:
description: Allows complete Server Bots administration
default: op
package com.kodari.serverbots;
import com.kodari.serverbots.bot.BotManager;
import com.kodari.serverbots.command.ServerBotsCommand;
import com.kodari.serverbots.listener.ServerBotsListener;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;
public final class ServerBotsPlugin extends JavaPlugin {
private BotManager botManager;
@Override
public void onEnable() {
saveDefaultConfig();
this.botManager = new BotManager(this);
ServerBotsCommand command = new ServerBotsCommand(this, botManager);
PluginCommand pluginCommand = getCommand("sbot");
if (pluginCommand != null) {
pluginCommand.setExecutor(command);
pluginCommand.setTabCompleter(command);
}
Bukkit.getPluginManager().registerEvents(new ServerBotsListener(this, botManager), this);
}
@Override
public void onDisable() {
if (botManager != null) {
botManager.shutdown();
}
}
public BotManager getBotManager() {
return botManager;
}
}