Class RoleUtils

java.lang.Object
com.hypixel.hytale.server.npc.role.RoleUtils

public class RoleUtils extends Object
A utility class that contains useful role-specific methods
  • 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 - The ComponentAccessor<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 - The ComponentAccessor<EntityStore> for component access.