Using non-player characters (NPCs) in Minecraft is a good way of adding your own content into a world that you are creating for others. They can interact with players in several ways:
- Displaying a fixed dialogue when players click on them. This may provide them with important information about the world or clues for a treasure hunt.
- Display one or more buttons that run commands or open up web page. This is where we need to have a good understanding of Minecraft slash commands.
- Stay in a fixed position. NPCs do not move although they can fall downwards. They can only be added and removed by a ‘world builder’.
Step 1 – Find NPC egg from Inventory
Step 2 – Toggle World Builder ‘on’
Step 3 – Place and configure NPC
Step 4 – Advanced Settings to add URL or Command
There are 3 options for when the command is run:
- Button mode – the user must click the button for the command to run. You can set the label for the button.
- On enter – the command is run when the user right-clicks the NPC to read the dialogue.
- On exit – the command is run is when the user closes the dialogue box.