-
Notifications
You must be signed in to change notification settings - Fork 32
Commands
This page provides a comprehensive list of commands available in ZNPCsPlus, along with detailed explanations and examples for each command.
Creates a NPC with the specified ID and type. The id
parameter is a unique identifier for the NPC, and the type
parameter determines the type of the NPC. List of All NPC Types
Examples:
/npc create my_npc zombie
/npc create npc1 player
/npc create shop_npc villager
Deletes the NPC with the specified ID. This command permanently removes the specified NPC from the world.
Example:
/npc delete my_npc
/npc delete npc1
Changes the ID of an existing NPC. This command allows you to update the identifier of an NPC.
Example:
/npc changeid old_npc new_npc
/npc changeid villager_npc trader_npc
Toggles the state of an NPC, making it visible or invisible. This command switches the NPC's visibility between being active and inactive.
Example:
/npc toggle my_npc
/npc toggle npc1
Lists all existing NPCs.
Usage:
/npc list
Changes the type of an NPC. List of All NPC Types
Example:
/npc type my_npc skeleton
/npc type npc1 cow
Lists NPCs within a specified distance. This command shows a list of NPCs located within the specified range from the player.
Example:
/npc near 10
/npc near 5
Moves the NPC to the center of the block in the X and Z axes without changing its elevation
Example:
/npc center my_npc
/npc center npc1
Makes the NPC look at the player. This command adjusts the NPC's orientation to face the player.
Example:
/npc lookatme my_npc
/npc lookatme npc1
Sets the location of an NPC. This command allows you to specify the exact coordinates (x, y, z) where the NPC should be placed.
Example:
/npc setlocation my_npc 100 64 200
/npc setlocation npc1 50.5 70 -30.5
Sets the rotation of an NPC. This command adjusts the yaw and pitch angles of the specified NPC.
Example:
/npc setrotation my_npc 180 45
/npc setrotation npc1 90 0
Adjusting rotation can be useful for directing the NPC's orientation within the game.
Moves the NPC to the player's location.
Example:
/npc move my_npc
/npc move npc1
Teleports the player to the location of the specified NPC.
Example:
/npc teleport my_npc
/npc teleport npc1
Changes the skin of an NPC. This command allows you to customize the appearance of the specified NPC with different skin types and additional arguments.
There are four types of skins available for the /npc skin
command:
-
Static:
- Used to set the skin using a player's username.
- The skin remains unchanged even if the player changes their skin.
- Placeholders are not allowed.
- Example:
/npc skin my_npc static D3v1s0m
-
Dynamic:
- Used to set the skin using a player's username.
- The skin updates according to the input.
- Placeholders are allowed; it updates if the player changes their skin or based on a specified placeholder.
- Example:
/npc skin my_npc dynamic Notch
- Example:
/npc skin my_npc dynamic %player_name%
-
Mirror:
- Makes the NPC have the same skin as the player viewing it.
- For each player, it shows their own skin.
- Example:
/npc skin my_npc mirror
-
URL:
- Sets the skin using the URL of the skin file.
- Two skin variants available: Classic (4-pixel skin) and Slim (3-pixel skin or Alex slim).
- Example:
/npc skin my_npc url classic http://textures.minecraft.net/texture/5d6f51d459e743fc87cf61f1ca6d312e46270847c5ce293a0744be3e73d26751
- Example:
/npc skin my_npc url slim https://imgur.com/VZ8Yo58
Adds a hologram line to the specified NPC.
Example:
/npc holo add my_npc Hello, I am an NPC
/npc holo add npc1 &6Welcome to the server
Note: To add an empty hologram line, use %blank%
as the text.
Adds an item hologram to the specified NPC. This command allows you to display an item in the NPC's hologram.
Example:
-
/npc holo additem my_npc
(Holding item in hand)
Deletes a hologram line from the specified NPC.
Example:
/npc holo delete my_npc 1
/npc holo delete npc1 2
Displays information about the hologram of the specified NPC.
Example:
/npc holo info my_npc
Inserts a new hologram line at the specified position for the specified NPC.
Example:
/npc holo insert my_npc 1 Welcome
/npc holo insert npc1 2 Goodbye
Note: To insert an empty hologram line, use %blank%
as the text.
Inserts an item hologram at the specified position for the specified NPC.
Example:
-
/npc holo insertitem my_npc 1
(Holding item in hand) -
/npc holo insertitem npc1 2
(Holding item in hand)
Sets the text of a hologram line for the specified NPC.
Example:
/npc holo set my_npc 1 Hello
/npc holo set npc1 2 Welcome
Note: To set an empty hologram line, use %blank%
as the text.
Sets the item hologram for the specified NPC.
Example:
-
/npc holo setitem my_npc 1
(Holding item in hand) -
/npc holo setitem npc1 2
(Holding item in hand)
Sets the offset of the hologram for the specified NPC. This command allows you to adjust the vertical position of the hologram.
0 is the default value where the hologram is placed at the NPC's head.
Example:
-
/npc holo offset my_npc 1
(Moves the hologram up by 1 block) -
/npc holo offset npc1 -0.5
(Moves the hologram down by 0.5 blocks)
Sets the refresh delay of the hologram for the specified NPC. This command allows you to adjust the refresh rate of the hologram.
The refresh delay is the time in seconds between each update of the hologram. This is useful for placeholders.
-1 is the default value where the hologram is not refreshed.
Example:
-
/npc holo refreshdelay my_npc 5
(Sets the refresh delay to 5 seconds)
Sets a property for the specified NPC to the specified value. All Properties are listed in Properties page
Example:
-
/npc property set my_npc dinnerbone true
(Applies to all NPCs except Player and Ender Dragon) -
/npc property set zombie1 baby true
(Applies to Ageable NPCs) -
/npc property set farm_shop villager_profession farmer
(Applies to Villager NPCs)
Removes a property from the specified NPC.
Example:
/npc property remove my_npc dinnerbone
/npc property remove zombie1 baby
/npc property remove farm_shop villager_profession
Adds an action to the specified NPC. This command allows you to add an action to the NPC, which can be triggered when a player interacts with the NPC.
<action>
can be one of the following:
-
consolecommand
- Executes a command as the console. -
message
- Sends a message to the player. -
playerchat
- Sends a message on behalf of the player. -
playercommand
- Executes a command as the player. -
switchserver
- Moves the player to another server. (BungeeCord only)
<click type>
can be one of the following:
-
ANY_CLICK
- action will be triggered on any click (left or right) -
LEFT_CLICK
- action will be triggered on left click (attack) only -
RIGHT_CLICK
- action will be triggered on right click (interact) only
<cooldown seconds>
is the cooldown time in seconds for the action. If the player interacts with the NPC before the cooldown time has passed, the action will not be triggered.
<delay ticks>
is the delay in ticks before the action is triggered. This is useful for delaying the action after the player interacts with the NPC.
<value>
is the value of the action. This can be a command, message, or server name depending on the action type.
Examples:
-
/npc action add consolecommand my_npc ANY_CLICK 5 0 "say Hello, I am an NPC"
(Executes the command "say Hello, I am an NPC" on any click) -
/npc action add message npc1 LEFT_CLICK 10 20 "Welcome to the server!"
(Sends a message "Welcome to the server!" to the player when the NPC is left-clicked) -
/npc action add playercommand shop_warp RIGHT_CLICK 5 0 "warp shop"
(Executes the command "warp shop" when the NPC is right-clicked)
Clears all actions from the specified NPC.
Example:
/npc action clear my_npc
Deletes the action at the specified index from the specified NPC. The index is the position of the action in the list of actions (use List Command to see the index).
Example:
/npc action delete my_npc 1
/npc action delete npc1 2
Edits the action at the specified index for the specified NPC. This command allows you to modify the properties of an existing action.
Example:
/npc action edit my_npc 1 consolecommand ANY_CLICK 5 0 "msg %player_name% Hello, I am an NPC"
-
/npc action edit npc1 2 message LEFT_CLICK 10 20 "Welcome to the server!
"` /npc action edit shop_npc 3 playercommand ANY_CLICK 5 0 "warp shop"
Lists all actions of the specified NPC.
Example:
/npc action list my_npc
/npc action list npc1
Saves all NPCs
Usage:
/npc storage save
Reloads all NPCs
Usage:
/npc storage reload
Imports NPCs from the specified importer. Note: please refer to the Converting page for more information.
Welcome to the documentation for ZNPCsPlus!
- Home: Introduction and Overview
- Setup: Installation and Configuration
- Converting: Migrating from Older Versions or Other Plugins
- Commands: List of Available Commands
- Permissions: Permissions and Access Control
- NPC Types: Information about Different NPC Types
- Properties: Customization Options
- API Docs: Documentation of API
- Other: Additional Resources and Information
Feel free to click on any of the links above to access the corresponding page for detailed information on that topic. If you have any questions or need further assistance, please don't hesitate to reach out on our Discord server