Contents
Class RoleUtils
java.lang.Object
com.hypixel.hytale.server.npc.role.RoleUtils
A utility class that contains useful role-specific methods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetArmor(Ref<EntityStore> ref, NPCEntity npcComponent, String armor, ComponentAccessor<EntityStore> componentAccessor) Called to set the armor of the NPCs armor to the given item IDstatic voidsetItemInHand(Ref<EntityStore> ref, NPCEntity npcComponent, String itemInHand, ComponentAccessor<EntityStore> componentAccessor) Called to set the item of the NPCs hand to the given item ID
-
Constructor Details
-
RoleUtils
public RoleUtils()
-
-
Method Details
-
setItemInHand
public static void setItemInHand(@Nonnull Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, @Nullable String itemInHand, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Called to set the item of the NPCs hand to the given item ID- Parameters:
ref- The entity reference of the NPC entity.npcComponent- The NPC component of the NPC entity.itemInHand- The array of hand items to be set.componentAccessor- TheComponentAccessor<EntityStore>for component access.
-
setArmor
public static void setArmor(@Nonnull Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, @Nullable String armor, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Called to set the armor of the NPCs armor to the given item ID- Parameters:
ref- The entity reference of the NPC entity.npcComponent- The NPC component of the NPC entity.armor- The ID of armor item to be set.componentAccessor- TheComponentAccessor<EntityStore>for component access.
-