notjavindra2

Create a plugin where using:

/fakeplayer summon <gearset> <amount> <randomNames>

spawns a chosen number of AI-controlled fake players.

Gearset can be fully enchanted armor sets such as copper, iron, diamond, or netherite.

Amount specifies how many fake players to summon.

RandomNames enables automatically generated random usernames.

Each fake player should:

Have max-enchanted armor and weapons (sword and axe).

Carry a water bucket for clutching.

Use potions and reapply them when effects expire.

Automatically use Totems of Undying and instantly replace them after one is consumed.

Immediately defend each other — if one is attacked, all nearby fake players target and fight the attacke

Kodari AI
KodariMar 3 at 10:26 pm 17,789 (v2)

I’ll create an AI-controlled fake player plugin with advanced combat mechanics.

FakePlayerAI
Advanced AI-controlled fake player system that spawns NPCs with full combat capabilities. Features include customizable enchanted gear sets (copper, iron, diamond, netherite), intelligent combat AI with weapon switching, automatic water bucket clutching, smart potion usage with reapplication, instant totem replacement mechanics, and team defense coordination. Fake players automatically defend each other when attacked and use advanced survival tactics.

Now I’ll create the complete plugin with Citizens API integration for advanced AI combat mechanics.

Plugin created successfully!

Features implemented:

  • Citizens-based AI fake players with full combat capabilities

  • Four gear sets (copper/chainmail, iron, diamond, netherite) with max enchantments

  • Smart combat AI that finds and attacks nearest players

  • Automatic potion reapplication (Strength, Speed, Regeneration) when effects expire

  • Totem of Undying auto-replacement system

  • Water bucket clutching to prevent fall damage

  • Team defense coordination - all nearby fake players defend each other when attacked

  • Random name generator with multiple patterns

Commands:

  • /fakeplayer summon <gearset> <amount> <randomNames> - Spawn AI fighters

  • /fakeplayer remove <id> - Remove specific fake player

  • /fakeplayer removeall - Clear all fake players

  • /fakeplayer list - View active fake players

The AI uses Citizens NPC pathfinding for movement, monitors health/effects/totems, and coordinates team attacks through event-driven damage detection.

notjavindra2

only for 1.21.11

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
9 918
src/main/java/com/fakeplayerai/FakePlayerPlugin.java
package com.fakeplayerai;

import com.fakeplayerai.command.FakePlayerCommand;
import com.fakeplayerai.manager.FakePlayerManager;
import com.fakeplayerai.trait.FakePlayerController;
import lombok.Getter;
import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.event.CitizensEnableEvent;
import net.citizensnpcs.api.trait.TraitInfo;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class FakePlayerPlugin extends JavaPlugin implements Listener {

    private FakePlayerManager fakePlayerManager;
    private boolean citizensEnabled;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.fakePlayerManager = new FakePlayerManager(this);
        
        getServer().getPluginManager().registerEvents(this, this);
        getServer().getPluginManager().registerEvents(fakePlayerManager, this);
        
        getCommand("fakeplayer").setExecutor(new FakePlayerCommand(this));
        
        if (getServer().getPluginManager().isPluginEnabled("Citizens")) {
            enableCitizensIntegration();
        }
    }

    @Override
    public void onDisable() {
        if (fakePlayerManager != null) {
            fakePlayerManager.removeAll();
        }
    }

    @EventHandler
    public void onCitizensEnable(CitizensEnableEvent event) {
        enableCitizensIntegration();
    }

    private void enableCitizensIntegration() {
        if (citizensEnabled) return;
        
        CitizensAPI.getTraitFactory().registerTrait(TraitInfo.create(FakePlayerController.class));
        
        citizensEnabled = true;
        getLogger().info("Citizens integration enabled!");
    }
}