

In this case, with On Exit toggled on and the command /give gold_ingot, players would receive one gold ingot in their inventory when the dialogue box closes and the NPC interaction ends. If On Exit is toggled, then the command will trigger when the player ends and interaction and closes the NPC dialogue. In this case, with On Enter toggled on and the command /give gold_ingot, players would receive one gold ingot in their inventory when the dialogue box opens on dialogue initiation with the NPC. If On Enter is toggled, then the command will run when players initiate a conversation with the NPC. This command will only run if the button is pressed.įor example, we could use a combination of the command /give gold_ingot and a button labelled Money? When players click the Money? button, they receive one gold ingot into their inventory. If Button Mode is toggled on, a text box appears where you can enter text that will appear on a button. There are settings to customize the way commands work with NPCs. For a list of commands that your NPCs can execute, see Commands. Your NPC will execute these commands in order whenever a player interacts with them and closes their dialog box. If you want to add more commands, click the Add Command button and enter the commands you want to enter.Make sure you only enter one command in this field. Enter the Command you want to execute.To add commands to an NPC, follow these instructions: Unlike a Command Block, a single NPC can execute multiple commands. You can add commands to an NPC that the NPC will execute after a player closes their dialog window. You can use the left and right arrow buttons to see more skins. In the Appearance section, click the skin that you want to use for your NPC.To change an NPC's skin, follow these instructions: You can choose from a list of skins to customize the appearance of your NPC. See NPC Dialogue Command for more information. You can use behavior packs and commands to create a more advanced dialogue system for your custom NPCs. You can also use color codes to change the color of the text. This dialog box has a limit of 307 characters before the text goes off the screen. The NPC editor has a built in dialog feature to give players more information about the commands they will execute or to deliver story details. You can use color codes to change the color of the name text. Right-click the NPC to open the NPC interface.If you misplace an NPC, you can left-click to despawn them. Right-click to place an NPC on your desired block.Get an NPC spawn egg from the creative menu or by using the command /give spawn_egg 1 51.To obtain a custom NPC, follow these instructions:


Later, to interact with your custom NPCs, you will need to switch from Creative mode to either Survival mode or Adventure mode.
