not_luffy07
📎 1 file 4,920 chars
📄
pasted-code-1790600039747.txt
txt 204 lines
▶
ज़रूर, आपके नए सभी features को जोड़कर पूरा English prompt इस तरह रहेगा:

I want to create an advanced Minecraft Java plugin called **FightBot**.

Instead of spawning zombies, the plugin should spawn **custom NPCs** that can be controlled using commands.

### NPC Spawn System

I want a command such as:

`/fightbot spawn `

Examples:

* `/fightbot spawn 1`
* `/fightbot spawn 20`
* `/fightbot spawn 50`
* `/fightbot spawn 100`

This should spawn the specified number of NPC fight bots at the player's location.

The NPCs should be properly tracked by the plugin so that I can control them later using commands.

### NPC Commands

The NPCs should support commands such as:

`/fightbot follow `

* Makes the NPC follow the specified player.
* Example:
  `/fightbot follow Steve`

`/fightbot group all`

* Selects or controls all spawned NPCs as a group.

`/fightbot patrol`

* Makes the selected NPCs patrol an area.

`/fightbot roam`

* Makes the NPCs move around naturally within a configurable area.

The plugin should allow me to control individual NPCs as well as all NPCs together.

### Group System

Add a group-management system.

Commands should include:

`/fightbot group all`

`/fightbot group create `

`/fightbot group add  `

`/fightbot group remove  `

`/fightbot group list`

This should allow multiple NPCs to be controlled together.

### NPC Armor and Kit System

I want a command specifically for giving armor and kits to the NPCs:

`/fightbot armor all`

or something similar such as:

`/fightbot armor `

The important feature is that I should be able to give any custom armor kit to the NPCs.

The kit system should allow me to:

* Equip helmets
* Equip chestplates
* Equip leggings
* Equip boots
* Equip weapons
* Equip off-hand items
* Use custom enchantments
* Customize item names
* Customize item lore
* Configure item attributes

### Inventory-Based Kit Editor

I also want a **kit editor based on the player's inventory**.

For example:

`/fightbot kit create `

When I use this command, I should be able to edit the NPC's equipment using my own inventory.

I should be able to:

* Put armor into the armor slots.
* Put a weapon into the main hand.
* Put an item into the off-hand.
* Use any items from my inventory.
* Keep custom enchantments and item properties.
* Save the complete setup as a kit.

Then I should be able to apply that kit to NPCs using:

`/fightbot kit apply  all`

or:

`/fightbot armor  all`

For example:

`/fightbot kit apply warrior all`

This should equip every selected NPC with the saved Warrior kit.

### NPC Behavior

The NPCs should be able to:

* Follow a player.
* Patrol an area.
* Roam around.
* Move as a group.
* Stay together as a group.
* Receive commands individually or as a group.
* Have configurable movement speed.
* Have configurable health and attack damage.
* Be used as fight bots for PvP practice.

### Main Commands

Use a clean command structure such as:

`/fightbot spawn `

`/fightbot follow `

`/fightbot patrol`

`/fightbot roam`

`/fightbot group all`

`/fightbot group create `

`/fightbot group add  `

`/fightbot armor all`

`/fightbot kit create `

`/fightbot kit apply  all`

`/fightbot list`

`/fightbot remove all`

`/fightbot reload`

### Configuration

Everything important should be configurable through `config.yml`, including:

* Maximum NPC count
* NPC name
* NPC health
* Attack damage
* Movement speed
* Follow distance
* Patrol distance
* Equipment
* Enchantments
* Default kits
* NPC behavior
* Messages
* Permissions

### Important Requirements

* Do not use normal zombies as the main system; use proper custom NPC/fight-bot entities.
* NPCs spawned by the plugin must be tracked separately.
* The plugin should support at least 100 NPCs efficiently.
* Commands should support tab completion.
* Add permission nodes for admin commands.
* All messages should be configurable.
* The plugin should be optimized for performance.
* Make it compatible with the latest Paper Minecraft Java Edition.
* Use a clean and modular code structure.
* Provide complete working source code, not pseudo-code.
* Include `plugin.yml`, `config.yml`, `pom.xml`, and all required Java classes.
* Include clear instructions for compiling the plugin into a `.jar`.

The final plugin should function as a complete **NPC Fight Bot System**, allowing me to spawn multiple NPCs, control them with Follow, Patrol, Roam, and Group commands, and equip them with custom kits created directly from my own inventory.

इस prompt में आपके **NPC + Follow + Patrol + Group + Inventory Kit Editor + Armor System** सभी features शामिल हैं।
Kodari AI
KodariSep 28 at 12:56 pm 1
FightBot
Advanced Minecraft plugin that spawns custom NPC fight bots for PvP practice. Features a command-driven NPC system with spawn, follow, patrol, roam, and group management capabilities. Includes a GUI-based kit editor that captures player inventory contents to create custom armor and weapon loadouts with enchantments, names, lore, and attributes. Kits can be applied to individual NPCs, groups, or all bots. NPCs are tracked separately with configurable health, damage, speed, and behavior. Supports tab completion, permission nodes, configurable messages, and optimized performance for 100+ NPCs on Paper servers.

Plan:

  1. Set up a Java 21 Paper Maven plugin with configurable messages and limits.

  2. Implement tracked Vindicator fight bots with follow, patrol, roam, groups, and commands.

  3. Add persistent kits, an inventory kit editor, tab completion, and build instructions.

Created the FightBot Paper plugin source with configurable Vindicator-based fight bots, follow/patrol/roam/stay behaviors, groups, kit editing and application, persistence, permissions, and tab completion.

Build with Java 21 and Maven: run mvn package, then place target/FightBot.jar in the server’s plugins folder. The project targets Paper 1.21.4.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
12 1,184
src/main/java/io/github/fightbot/FightBotPlugin.java
package io.github.fightbot;

import io.github.fightbot.bot.BotManager;
import io.github.fightbot.command.FightBotCommand;
import io.github.fightbot.group.GroupManager;
import io.github.fightbot.kit.KitEditorListener;
import io.github.fightbot.kit.KitManager;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class FightBotPlugin extends JavaPlugin {
    private BotManager botManager;
    private GroupManager groupManager;
    private KitManager kitManager;
    private KitEditorListener kitEditorListener;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        this.groupManager = new GroupManager(this);
        this.kitManager = new KitManager(this);
        this.botManager = new BotManager(this);
        this.kitEditorListener = new KitEditorListener(this, kitManager);

        Bukkit.getPluginManager().registerEvents(botManager, this);
        Bukkit.getPluginManager().registerEvents(kitEditorListener, this);
        PluginCommand command = getCommand("fightbot");
        if (command == null) {
            getLogger().severe("The fightbot command is missing from plugin.yml.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        FightBotCommand handler = new FightBotCommand(this);
        command.setExecutor(handler);
        command.setTabCompleter(handler);
    }

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

    public BotManager getBotManager() {
        return botManager;
    }

    public GroupManager getGroupManager() {
        return groupManager;
    }

    public KitManager getKitManager() {
        return kitManager;
    }

    public KitEditorListener getKitEditorListener() {
        return kitEditorListener;
    }
}