Class PlayerHudWrapper

java.lang.Object
dev.lone.itemsadder.api.FontImages.PlayerHudWrapper
Direct Known Subclasses:
PlayerQuantityHudWrapper

public class PlayerHudWrapper extends Object
Wrapper for a player HUD.
  • Constructor Details

    • PlayerHudWrapper

      public PlayerHudWrapper(PlayerHudsHolderWrapper playerHUDsHolderWrapper, String namespacedID)
      Creates a player HUD wrapper.
      Parameters:
      playerHUDsHolderWrapper - the player's HUD holder wrapper.
      namespacedID - the HUD namespaced id.
  • Method Details

    • exists

      public boolean exists()
      Checks if the wrapped HUD exists.
      Returns:
      true if the internal HUD is present.
    • getNamespacedID

      public String getNamespacedID()
      Gets the HUD namespaced id.
      Returns:
      the namespaced id.
    • getInitialOffsetX

      public int getInitialOffsetX()
      Gets the initial X offset configured for this HUD.
      Returns:
      the initial X offset.
    • getOffsetX

      public int getOffsetX()
      Gets the current X offset.
      Returns:
      the current X offset.
    • setOffsetX

      public void setOffsetX(int offset)
      Sets the current X offset.
      Parameters:
      offset - the new X offset.
    • setVisible

      public void setVisible(boolean value)
      Sets whether this HUD is visible.
      Parameters:
      value - true to show the HUD.
    • isVisible

      public boolean isVisible()
      Checks if this HUD is visible.
      Returns:
      true if the HUD is visible.