Create, customize, and manage player-like NPCs with an in-game editor GUI, click actions, AI goals, and a built-in path system.
⚠️ Alpha Notice ⚠️
The alpha version allows you to add entity AI goals to NPCs.
It is not fully tested yet and may be unstable.If you encounter any issues, bugs, or have feature suggestions, feel free to contact me.
If you have any suggestions or encounter any issues, you can use the issue page or via Discord @Eisi05
If you want to make a tutorial video about it, feel free to do so
Spigot: 1.17.1 - 26.1.2
Paper: 1.21 - 26.1.2
/npc create/npc editCommand (run commands with placeholders + variables)Server (send players to a BungeeCord server)Wait (wait by time or by command trigger)Animation (play an animation)Path (make the NPC walk along a saved path)SetVariable (set local/instance/global numeric variables)Condition (run a sub-chain if an expression is true)Loop (repeat a sub-chain; while-loop or for-loop)Npc (apply NPC options per-player or globally as an action)Stop (stop the chain)en).plugins/ folder.plugins/NpcPlugin/config.ymlplugins/NpcPlugin/lang/<language>/*.yml/npc reload./npc create/npc editWhile edit-mode is enabled:
If the NPC is not editable, you’ll get a message like This NPC is not editable!.
The GUI lets you change things like:
.png file)In the NPC GUI go to Click Action.
You can configure actions separately for:
You can create an action chain by adding multiple actions.
CommandExecutes a command.
/ (the plugin stores it as /<command>).{player} / %player% / <player>{player_name} / %player_name% / <player_name>Example:
warp spawnserver hubmsg {player} Welcome!Server (BungeeCord)Sends the player to another BungeeCord server.
Example server name:
hubWaitPauses the chain before continuing.
You can switch between two modes in the editor:
0.05s, max 600s)Instead of waiting for time, the chain waits until an admin triggers it:
Wait stores a name (string)/npc wait <player> <name> [values...]If [values...] are provided, they are exposed to the next actions as local variables:
<name>-0, <name>-1, ... (numeric values; invalid numbers become 0.0)This is useful to wait for external systems (minigames, scripted events, etc.).
The Path action also uses the same wait mechanism internally: the chain continues when the NPC finishes walking.
PathMakes the NPC walk along a saved path.
0.01–1.0).AnimationPlays an animation on the NPC for the clicking player.
SetVariableSets a numeric variable.
global-variables.yml)^a-zA-Z_*$If the value is missing, the action does nothing (admins get a warning).
ConditionRuns a sub-chain only if its expression is true.
LoopRepeats a sub-chain.
There are two loop types:
true0)1)You can change the loop type by Shift-clicking the action.
NpcOpens a special editor that lets you apply NPC options as an action.
This is mainly used to change how the NPC looks/behaves for:
Two flags exist:
StopStops the current chain immediately (and stops nested chains too).
In the action editor you can enable Run on show.
If enabled, the chain triggers when the NPC is shown to a player (not only when clicked).
Paths are shared and stored in:
plugins/NpcPlugin/paths.ymlAdd points at your current location:
/npc path point addOr add at a specific index:
/npc path point add <index>List points:
/npc path point list [page]Visualize / toggle visualization of current points:
/npc path visualize pointsCreate the path:
/npc path create <name> [maxIterations] [allowDiagonalMovement]After creation you can visualize it:
/npc path visualize <name>Start recording:
/npc path record startWalk the route.
Stop recording:
/npc path record stopCreate the path:
/npc path create <name>/npc path edit <name>This loads the saved path’s waypoints into the point list so you can remove/add points and re-create it.
/npc path list [page]/npc path delete <name>/npc path test <name> [speed]Goals give NPCs autonomous behavior. Configure them via the NPC editor GUI.
Target entities using expressions with variables:
$distance - Distance to NPC$entity.x, $entity.y, $entity.z - Entity position$entity.health - Entity health$npc.x, $npc.y, $npc.z - NPC position[if entity @s[type=zombie]] - Command-based entity type checkExample predicates:
$distance < 5 - Only attack within 5 blocks$entity.health < 10 - Attack low health entities$distance < 10 && $entity.health > 5 - Combined conditionsFor more details, see the full Goals documentation.
Use mathematical expressions in click actions, goal conditions, and variable calculations.
Operators: +, -, *, /, ^ (power), &&, ||, !, ==, !=, <, >, <=, >=
Math Functions: sin(), cos(), tan(), sqrt(), log(), exp(), ceil(), floor(), round(), trunc(), abs()
Constants: PI, E
$varName - Auto-resolve (local → instance → global)$global.varName - Server-wide variable$instance.varName - NPC-specific variable$local.varName - Player-specific variableSpecial Variables:
$self.rightClick / $self.leftClick - Click type (1 or 0)$self.sneaking, $self.flying, $self.op - Player state$loop.index - Loop iteration index(/command) - Execute command inside expression/command - Standalone command executionExamples:
2 + (/count players) - Use command result in calculation$global.score + 1 - Increment variable($entity.health < 10) * 5 - Conditional valueFor the full syntax reference, see the Expression Parser documentation.
/npc create/npc copy <uuid>/npc edit (toggle edit-mode)/npc list (opens NPC list GUI)/npc tp <uuid>/npc tphere <uuid>/npc reload/npc version/npc update (checks for a new plugin version)/npc config reload/npc config debug [true|false]/npc config avoid-command-check [true|false]/npc config look-at-update-interval [ticks]/npc config input-time [seconds]/npc config auto-update [true|false]/npc config placeholder-timer [ticks]/npc config list/npc exceptions [page]/npc exceptions show <name>/npc exceptions delete <name>All path commands are under:
/npc path ...Main subcommands:
point add [index] [location] [rotation]point remove [index|location]point list [page]point clearcreate [name] [maxIterations] [allowDiagonalMovement]delete <name>list [page]visualize [name]visualize pointsrecord start|stoptest <name> [speed]edit <name>Manage server-wide global variables via commands:
/npc variable list - List all global variables/npc variable get <name> - Get a variable's value/npc variable set <name> <expression> - Set a variable (supports expressions)/npc variable delete <name> - Delete a variableVariables can also be managed via the SetVariable click action and used in expressions throughout the plugin.
config.yml)look-at-update-interval:
avoid-command-check:
true, commands added to NPC actions will not be strictly validated.debug:
input-time:
< 0, no timeout).auto-update:
placeholderTimer:
npc.admin/npc edit!bStats
