Class HotbarManager

java.lang.Object
com.hypixel.hytale.server.core.entity.entities.player.HotbarManager

public class HotbarManager extends Object
A class that handles all hotbar-related functionality for a player
  • Field Details

  • Constructor Details

    • HotbarManager

      public HotbarManager()
  • Method Details

    • saveHotbar

      public void saveHotbar(@Nonnull Ref<EntityStore> playerRef, short hotbarIndex, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to save the hotbar of the given index
      Parameters:
      playerRef - The entity reference of the player entity
      hotbarIndex - The index of the hotbar
      componentAccessor - The ComponentAccessor for component access
    • loadHotbar

      public void loadHotbar(@Nonnull Ref<EntityStore> playerRef, short hotbarIndex, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to load the hotbar of the given index
      Parameters:
      playerRef - The entity reference of the player entity
      hotbarIndex - The index of the hotbar
      componentAccessor - The ComponentAccessor for component access
    • getCurrentHotbarIndex

      public int getCurrentHotbarIndex()
      Returns:
      the current hotbar index that is active
    • getIsCurrentlyLoadingHotbar

      public boolean getIsCurrentlyLoadingHotbar()
      Returns:
      true if a hotbar is being loaded, false otherwise