bipnix_fr

Haan — problem ye hai ki AI Armor Stand ko NPC ke replacement ke taur par use kar raha hai. Prompt mein explicitly bolna hoga ki real player-type NPC / fake player entity chahiye, Armor Stand nahi.

Use this corrected prompt:

NaitikCitizenPlugin — Real Fake Player NPC Requirement

Build NaitikCitizenPlugin as a professional Minecraft server plugin that creates realistic fake player NPCs, similar to the player NPC experience provided by Citizens.

CRITICAL REQUIREMENT

DO NOT use Armor Stands as NPCs.

DO NOT use Zombies, Skeletons, Villagers, or any other mob as a replacement for the player NPC.

DO NOT create an Armor Stand with a player head and call it a fake player.

The NPC must be implemented as a player-type / fake-player entity so that it visually appears as an actual Minecraft player.

When a player sees the NPC, it should look like another Minecraft player, including:

  • Real player model
  • Player skin
  • Player name
  • Player body
  • Player head
  • Arms
  • Legs
  • Player animations
  • Player rotation
  • Player movement
  • Armor
  • Held items
  • Off-hand items
  • Sneaking
  • Swing animation
  • Damage animation

The implementation must use the appropriate player/NPC entity and packet/server-internal approach required by the target Minecraft server version.

REAL PLAYER-LIKE BEHAVIOR

The fake player must support player-style behavior:

  • Walk
  • Run
  • Jump
  • Look around
  • Look at players
  • Follow players
  • Move to locations
  • Equip armor
  • Hold items
  • Attack
  • Take damage
  • Use animations
  • Sneak
  • Interact where supported

The NPC's movement speed must not be artificially reduced.

NPC COMMANDS

Implement:

"/npc create <name>"

"/npc remove <name>"

"/npc removeall"

"/npc list"

"/npc select <name>"

"/npc deselect"

"/npc skin <skin>"

"/npc rename <name>"

"/npc teleport"

"/npc move <x> <y> <z>"

"/npc look"

"/npc follow <player>"

"/npc speed <value>"

"/npc equip"

"/npc behavior <type>"

"/npc action"

"/npc reload"

IMPORTANT IMPLEMENTATION RULE

If the normal Bukkit/Spigot/Paper API does not provide a real player NPC entity, do not fall back to an Armor Stand.

Instead, implement the fake player using the correct low-level server/NMS/packet approach for the exact Minecraft version.

The final NPC must be rendered to clients as a player entity, not as an Armor Stand or mob.

VISUAL TEST

After creating:

"/npc create TestNPC"

a normal player should see TestNPC as a normal Minecraft player character.

It must NOT look like:

  • Armor Stand
  • Player head floating above an entity
  • Zombie
  • Villager
  • Skeleton
  • Invisible mob with a name tag

It must look like a real Minecraft player/fake player.

FINAL VALIDATION

Before completing the project, test specifically:

  1. NPC appears as a player model.
  2. NPC does not use an Armor Stand.
  3. NPC does not use a mob as its base entity.
  4. Skin renders correctly.
  5. Player model renders correctly.
  6. Name renders correctly.
  7. Armor renders correctly.
  8. Held items render correctly.
  9. NPC can move.
  10. NPC can rotate its head/body.
  11. NPC can perform player animations.
  12. NPC can follow players.
  13. NPC can interact with configured systems.
  14. NPC survives server restarts.
  15. Multiple fake players can exist simultaneously.
  16. No artificial movement-speed reduction is applied.

If the implementation cannot create a genuine player-type NPC with the selected API, stop and adapt the implementation to the correct NMS/packet-based approach instead of substituting an Armor Stand.

The final result must be a genuine fake-player NPC system, not an Armor Stand NPC.

Kodari AI
KodariAug 16 at 4:52 am 2
NaitikCitizenPlugin
A professional Minecraft server plugin that creates realistic fake player NPCs using packet-based player entities, not Armor Stands or mobs. Implements full player-like behavior including walking, running, jumping, looking at players, following, equipping armor, holding items, attacking, taking damage, and performing animations. Features comprehensive NPC management commands for creating, removing, selecting, renaming, skinning, teleporting, moving, equipping, and configuring behaviors. Uses NMS/packet-level implementation to render genuine player entities with real player models, skins, names, and animations. Supports multiple simultaneous NPCs, persistent storage across restarts, and natural movement speeds without artificial reduction.
  • Create the Gradle project and plugin metadata for a Paper 1.20.4 target.

  • Implement a reflection-based NMS fake-player renderer that refuses Armor Stand and mob fallbacks.

  • Add persistent NPC definitions, movement/follow behavior, skins, equipment, animations, and restart loading.

  • Add the complete /npc command set with per-player selection and tab completion.

Created NaitikCitizenPlugin with:

  • Paper 1.20.4 Gradle setup.

  • Reflection-based ServerPlayer fake-player NPC implementation.

  • Explicitly no Armor Stand, zombie, villager, skeleton, or mob fallback.

  • Persistent NPC storage in npcs.yml.

  • Multiple simultaneous NPC support.

  • NPC creation, removal, selection, movement, rotation, follow behavior, speed, equipment, skins, animations, and reload handling.

  • Full /npc command suite and tab completion.

  • Player NPC packet spawning and despawning for online viewers.

  • Restart persistence and automatic respawning.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
11 1,166
src/main/java/com/naitik/citizen/NaitikCitizenPlugin.java
package com.naitik.citizen;

import com.naitik.citizen.npc.NmsBridge;
import com.naitik.citizen.npc.NpcManager;
import com.naitik.citizen.command.NpcCommand;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class NaitikCitizenPlugin extends JavaPlugin implements Listener {
    private NpcManager npcManager;

    @Override
    public void onEnable() {
        NmsBridge bridge;
        try {
            bridge = new NmsBridge();
        } catch (IllegalStateException exception) {
            getLogger().severe(exception.getMessage());
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        npcManager = new NpcManager(this, bridge);
        npcManager.load();
        getServer().getPluginManager().registerEvents(this, this);

        NpcCommand command = new NpcCommand(npcManager);
        getCommand("npc").setExecutor(command);
        getCommand("npc").setTabCompleter(command);

        Bukkit.getScheduler().runTaskTimer(this, npcManager::tick, 1L, 1L);
    }

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        Bukkit.getScheduler().runTaskLater(this, () -> npcManager.showTo(player), 10L);
    }

    @Override
    public void onDisable() {
        if (npcManager != null) {
            npcManager.shutdown();
        }
    }

    public NpcManager getNpcManager() {
        return npcManager;
    }
}