lamanoooo_nic

Create a Minecraft Paper 1.21.11 plugin called "IconicBots". This plugin adds highly advanced AI-controlled fake players that behave as realistically as possible without requiring real Minecraft clients.

Requirements:

• Bots are server-side entities that appear exactly like normal players. • Show in the TAB list with proper ping, skins, names, and online player count. • Join and leave with realistic join/quit messages. • Support unlimited custom bot profiles with skins (Mojang username or skin value/signature). • Save all bot data in YAML files. • Fully asynchronous where possible to prevent lag.

AI System: • Goal-based behavior engine instead of random movement. • Dynamic decision making based on surroundings. • Memory system so bots remember locations, players, and recent events. • Personality traits (friendly, aggressive, explorer, builder, farmer, miner, PvPer, trader, idle). • Hunger, health, inventory, armor, tools, and experience. • Randomized reaction times and human-like imperfections. • Configurable intelligence level.

Movement: • Human-like walking, sprinting, jumping, swimming, climbing, sneaking. • Smooth head rotation and camera movement. • Advanced pathfinding around obstacles. • Open and close doors and fence gates. • Avoid lava, cliffs, cactus, fire, and dangerous areas. • Ride boats, minecarts, and horses. • Sleep during the night when possible.

Survival: • Mine ores. • Chop trees. • Collect dropped items. • Place blocks. • Build simple structures. • Craft basic recipes. • Smelt items. • Eat food automatically. • Farm crops and replant. • Fish. • Store items in chests.

Combat: • Fight hostile mobs intelligently. • Optional PvP mode. • Shield usage. • Bow prediction. • Critical hits. • Pearl usage. • Golden apple usage. • Potion usage. • Retreat when low health. • Team behavior.

Social: • Random chat messages. • Reply to player chat. • Follow players. • Wave, crouch spam, look at players. • Trade with villagers. • Gather around spawn. • Celebrate achievements.

Server Integration: • Compatible with Paper 1.21.11. • API for other plugins. • Permissions for every command. • PlaceholderAPI support. • LuckPerms support. • Vault support (optional). • Citizens compatibility optional but not required.

Commands: /bot create <name> /bot remove <name> /bot spawn <name> /bot despawn <name> /bot follow <player> /bot stop /bot goto <x> <y> <z> /bot inventory /bot personality <type> /bot skin <player> /bot ai on|off /bot list /bot reload

Configuration: • Maximum bots. • Tick rate. • AI update interval. • Chat frequency. • Combat difficulty. • Movement speed. • Spawn locations. • Behavior weights. • Skin cache. • Performance settings.

Performance: • Designed for 100+ bots. • Efficient scheduler. • Distance-based AI sleeping. • Object pooling. • Minimal memory allocations. • No unnecessary packet spam.

Architecture: • Clean modular OOP design. • Extensive comments. • Proper event handling. • No deprecated APIs. • Maven project structure. • Compatible with Java 21. • Graceful error handling. • Comprehensive logging.

The bots should look and behave as close to real players as reasonably possible while maintaining excellent server performance. Prioritize realistic movement, believable decision-making, stability, clean architecture, and maintainable code over flashy features.

Kodari AI
KodariJul 28 at 8:55 am 7
IconicBots
IconicBots creates persistent, server-side AI bot companions for Paper servers. Bots use configurable profiles, skins, personalities, goals, memory, survival needs, inventories, movement, combat, social reactions, and follow or navigation commands. Bot data persists in YAML, while distance-aware scheduling, configurable intelligence, sleeping behavior, optional PvP, PlaceholderAPI support, LuckPerms-compatible permissions, and optional Vault economy integration help maintain performance on large servers.
Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
18 1,654
src/main/java/com/iconicbots/IconicBotsPlugin.java
package com.iconicbots;

import com.iconicbots.command.BotCommand;
import com.iconicbots.core.BotManager;
import com.iconicbots.integration.IconicBotsExpansion;
import com.iconicbots.integration.VaultHook;
import com.iconicbots.listener.BotListener;
import com.iconicbots.storage.BotStorage;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.logging.Level;

/**
 * Main lifecycle class. World access and entity mutation stay on the server
 * thread; only persistence preparation and optional integrations are isolated.
 */
public final class IconicBotsPlugin extends JavaPlugin {
    private BotStorage storage;
    private BotManager botManager;
    private VaultHook vaultHook;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.storage = new BotStorage(this);
        this.botManager = new BotManager(this, storage);
        this.botManager.loadProfiles();
        this.botManager.start();

        Bukkit.getPluginManager().registerEvents(new BotListener(botManager), this);

        BotCommand botCommand = new BotCommand(this, botManager);
        if (getCommand("bot") != null) {
            getCommand("bot").setExecutor(botCommand);
            getCommand("bot").setTabCompleter(botCommand);
        }

        if (Bukkit.getPluginManager().isPluginEnabled("Vault")) {
            this.vaultHook = new VaultHook();
            if (vaultHook.setup()) {
                getLogger().info("Vault economy integration enabled.");
            }
        }

        if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            new IconicBotsExpansion(this).register();
            getLogger().info("PlaceholderAPI integration enabled.");
        }

        getLogger().info("IconicBots enabled with " + botManager.getBots().size() + " profiles.");
    }

    @Override
    public void onDisable() {
        if (botManager != null) {
            botManager.shutdown();
        }
        if (storage != null) {
            storage.saveAll(botManager == null ? java.util.List.of() : botManager.getProfiles());
        }
        getLogger().info("IconicBots disabled.");
    }

    public BotStorage getStorage() {
        return storage;
    }

    public BotManager getBotManager() {
        return botManager;
    }

    public VaultHook getVaultHook() {
        return vaultHook;
    }

    public void reportError(String message, Throwable throwable) {
        getLogger().log(Level.WARNING, message, throwable);
    }
}