Class PlayerHudWrapper

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

public class PlayerHudWrapper extends Object
  • Constructor Details

  • Method Details

    • getInternal

      @Nullable public @Nullable Object getInternal()
      Gets the internal ItemsAdder object. Should only be used by the plugin developer.
      Returns:
      Internal ItemsAdder object.
    • exists

      public boolean exists()
      Check if the HUD exists in the ItemsAdder files and it's valid to be used by your plugin code.
      Returns:
      true the HUD exists in ItemsAdder files, otherwise false.
    • getNamespacedID

      public String getNamespacedID()
      Gets the Namespace and ID in the format namespace:id for this HUD.
      Returns:
      String representing the namespace and ID of the HUD.
    • getInitialOffsetX

      public int getInitialOffsetX()
      Obtain the original X offset of this player hud, useful in case you edited it using the API.
      Returns:
      integer value of the original X offset.
    • getOffsetX

      public int getOffsetX()
      Obtain the current X offset of this player HUD.
      Returns:
      integer value of current X offset.
    • setOffsetX

      public void setOffsetX(int offset)
      Edit the X offset of this player HUD. Since this is a HUD instance it will be applied only to the player which owns this HUD.
      Parameters:
      offset - int X offset.
    • setVisible

      public void setVisible(boolean value)
      Show or hide the HUD.
      Parameters:
      value - true if the HUD must be hidden, otherwise false.
    • isVisible

      public boolean isVisible()
      Check if the HUD is currently visible.
      Returns:
      true if the HUD is visible, otherwise false.