Skip to content

NPCGiveCommand

Package: com.hypixel.hytale.server.npc.commands

public class NPCGiveCommand extends NPCWorldCommandBase

Implements /npc give. Gives an item to a target NPC. If the item has an Armor configuration, it is applied as armor via RoleUtils.setArmor(). Otherwise, it is placed in the NPC’s hand via RoleUtils.setItemInHand().

Also provides a nothing sub-command to clear the NPC’s held item.

ArgumentTypeRequiredDescription
itemItemyesThe item asset to give to the NPC
public NPCGiveCommand()

Registers as sub-command "give" with translation key "server.commands.npc.give.desc". Adds GiveNothingCommand as a sub-command.

Sub-commandClass
nothingNPCGiveCommand.GiveNothingCommand
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.