Vikas Kumar

make a minecraft plugin that adds a npc but it can fight, run, walk and do normal player like activity and also look like a normal player advanced features :- It should have command to add npc in the world and it should be like normal player, we can give them kit and stuff like golden apples, armor that they can wear sword thorugh which they can fight also add option to be still and not do anything add option to only look towards selected players command /npc look vikplays1 like this and add a option though which it will stop looking anywhere and will remain on the position it was in like head and anything /npc stoplooking , like this ,now it should have option thorugh which we can decide the path of the npc like where he will go though blocks like obsidian but can walk also when it is not directly on the block but can walk/run if a block is between them, also have the option to fight npc to npc, lastly add option to change skin or name, for name it should be /npc changename thenpcname ,for skin it should be /npc skin set thepremiumplayername or /npc skin url xxxxxxxxx ,thorugh this we can add skin it will download from the internet, the plugin should be for 1.21.11

Kodari AI
KodariOct 7 at 12:05 pm 2
LivingNPCSystem
Creates lifelike NPCs that mimic real players with advanced AI behaviors. NPCs can fight, run, walk, and perform normal player activities while appearing as actual players. Features include comprehensive command system for NPC management: /npc add spawns NPCs, /npc look targets specific players for visual tracking, /npc stoplooking freezes head position, /npc path defines waypoint routes using blocks, /npc changename renames NPCs, /npc skin set downloads skins from premium players or URLs. NPCs support full equipment kits including armor, weapons, and consumables like golden apples. Includes NPC-to-NPC combat capabilities and idle/still modes. Built for Minecraft 1.21.11 with Paper API, implementing pathfinding, combat AI, and dynamic skin loading.
  1. Create a Paper 1.21.11 plugin using Citizens for player-shaped NPCs and pathfinding.

  2. Add NPC management commands for movement, combat, equipment, names, skins, and look targets.

  3. Include the plugin descriptor and configuration with clear Citizens dependency settings.

Created KodariNPC for Paper 1.21.11. It uses Citizens to create player-shaped NPCs, so Citizens must also be installed on the server.

Right-click an NPC to select it, then use commands such as:

  • /npc add <name> [skin]

  • /npc look <player> and /npc stoplooking

  • /npc changename <newName>

  • /npc skin set <playerName> or /npc skin url <https://...>

  • /npc kit warrior or /npc kit golden_apple

  • /npc path add at each waypoint, then /npc path start

  • /npc stay on|off, /npc speed walk|run, /npc fight on|off, /npc attack <player|npc>

Most controls also accept an NPC name before their options; /npc help lists the syntax. URL skins are processed through MineSkin.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
npc plugin
settings.gradle
Code
11 1,060
src/main/java/com/kodari/npc/KodariNPCPlugin.java
package com.kodari.npc;

import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class KodariNPCPlugin extends JavaPlugin {
    private NpcManager npcManager;
    private SkinService skinService;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        npcManager = new NpcManager(this);
        skinService = new SkinService(this);
        NpcCommand npcCommand = new NpcCommand(this, npcManager, skinService);
        PluginCommand command = getCommand("npc");
        if (command == null) {
            getLogger().severe("The npc command is missing from plugin.yml.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        command.setExecutor(npcCommand);
        command.setTabCompleter(npcCommand);
        getServer().getPluginManager().registerEvents(new NpcListener(npcManager), this);
    }

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