Commands - MarkusBordihn/BOs-Easy-NPC GitHub Wiki
Although most settings can be configured through the user interface, several commands are available for controlling NPCs. π οΈ These commands can be used in dialogues, command blocks, or scripts, allowing for more complex interactions and task automation. This also makes it possible to use NPCs with other mods or plugins that can execute commands.
πΉ Note: Most commands require the NPC's UUID as the first argument. Luckily, there's an autocomplete feature, so you don't need to memorize UUIDsβjust target the NPC to get an autocomplete suggestion! π€π‘
Use /easy_npc configure <NPC>
to open the configuration screen for a specific NPC.
This is a great way to fine-tune your NPC settings quickly! π
The debug command toggles debug mode for NPCs, helping with troubleshooting. π§
β‘οΈ See the Debugging page for more details.
The delete command allows you to remove an NPC from the game:
/easy_npc delete <NPC>
π₯ Use this carefullyβit permanently deletes the NPC!
Open a dialogue for a player with:
/easy_npc dialog open <NPC> <Player>
Open a specific dialogue entry:
/easy_npc dialog open <NPC> <Player> <DialogLabel>
Set a default dialogue with:
/easy_npc dialog set default <NPC> <DialogLabel>
β‘οΈ Check out the Dialogs page for more details on creating engaging conversations.
Equip your NPC with items using:
/easy_npc equipment set <NPC> <Slot> <Item>
Example: Equip a dragon head! π²
/easy_npc equipment set <NPC> armor.head minecraft:dragon_head
Or why not equip a bucket? πͺ£
/easy_npc equipment set <NPC> armor.head minecraft:bucket
Remove an item from a slot:
/easy_npc equipment remove <NPC> <Slot>
Example: Remove the item from the head slot:
/easy_npc equipment remove <NPC_UUID> armor.head
β‘οΈ For more details, visit the Equipment page.
Make an NPC interact with a block using:
/easy_npc interact <NPC> <Block Pos>
Reset NPC navigation:
/easy_npc navigation reset <NPC>
Set an NPC's home position:
/easy_npc navigation set home <NPC> <Block Pos>
Set an NPC's current position:
/easy_npc navigation set pos <NPC> <Block Pos>
Manage NPC objectives with this command.
Make an NPC follow an entity:
/easy_npc objective <NPC> set follow entity <Entity>
Make an NPC follow its owner:
/easy_npc objective <NPC> set follow owner
Make an NPC follow a player:
/easy_npc objective <NPC> set follow player <Player>
Stop following:
/easy_npc objective <NPC> remove follow entity
/easy_npc objective <NPC> remove follow owner
/easy_npc objective <NPC> remove follow player
List current follow objectives:
/easy_npc objective <NPC> list follow
β‘οΈ More info on Objectives.
Manage the owner of an NPC.
Set an owner:
/easy_npc owner set <NPC> <Player>
Remove an owner:
/easy_npc owner remove <NPC>
List the owner:
/easy_npc owner get <NPC>
Import or export NPC presets easily.
β‘οΈ More info on Presets.
Set custom models for NPCs.
Use this to set a custom model:
/easy_npc render set entity <NPC> <EntityType>
Example: Render an NPC as a spider π·οΈ:
/easy_npc render set entity <NPC> "minecraft:spider"
Revert to the default model:
/easy_npc render set type <NPC> DEFAULT
β‘οΈ Visit Custom Models for more info.
Respawn an NPC with:
/easy_npc respawn <NPC>
Set a default sound for an NPC:
/easy_npc sound set <NPC> <Sound Type> <ResourceLocation>
Example: Set a hurt sound:
/easy_npc sound set <NPC> HURT minecraft:entity.zombie.hurt
Manage NPC trading.
Reset trading offers:
/easy_npc trading reset <NPC>
Open the trading screen:
/easy_npc trading open <NPC> <Player>
β‘οΈ For more on trading, see Trading.
These commands help you take full control of your NPCs and create a richer gameplay experience! π