Commands - MarkusBordihn/BOs-Easy-NPC GitHub Wiki

Commands πŸ“œβœ¨

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! πŸ€–πŸ’‘

Configuration Command βš™οΈ

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! πŸ“

Debug Command πŸ›

The debug command toggles debug mode for NPCs, helping with troubleshooting. πŸ”§

➑️ See the Debugging page for more details.

Delete Command ❌

The delete command allows you to remove an NPC from the game:

/easy_npc delete <NPC>

πŸ’₯ Use this carefullyβ€”it permanently deletes the NPC!

Dialog Command πŸ’¬

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.

Equipment Command πŸ›‘οΈ

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.

Interact Command 🀝

Make an NPC interact with a block using:

/easy_npc interact <NPC> <Block Pos>

Navigation Command 🧭

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>

Objective Command 🎯

Manage NPC objectives with this command.

Follow Objective 🐾

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.

Owner Command 🏠

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>

Preset Command πŸ—‚οΈ

Import or export NPC presets easily.

➑️ More info on Presets.

Renderer Command 🎨

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 Command πŸŒ€

Respawn an NPC with:

/easy_npc respawn <NPC>

Sound Command πŸ”Š

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

Trading Command πŸ’°

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! πŸš€

⚠️ **GitHub.com Fallback** ⚠️