Interface HudObject

All Known Subinterfaces:
Compass, Hud, Popup

public interface HudObject
An element that can be display for BetterHud
  • Method Details

    • getName

      @NotNull @NotNull String getName()
      Gets an internal name of an object.
      Returns:
      id
    • isDefault

      boolean isDefault()
      Returns this object is a default object or not.
      Returns:
      whether to default
    • getType

      @NotNull @NotNull HudObjectType<?> getType()
      Gets the type instance.
      Returns:
      type instance
    • tick

      long tick()
      Gets object's frame time
      Returns:
      frame
    • getComponentsByType

      @Internal @NotNull default @NotNull HudComponentSupplier<?> getComponentsByType(@NotNull @NotNull HudPlayer player)
      Gets rendered component of this object.
      Parameters:
      player - target player
      Returns:
      component supplier
    • identifier

      @Internal @NotNull default @NotNull HudObject.Identifier identifier()
      Creates object identifier
      Returns:
      identifier
    • add

      default boolean add(@NotNull @NotNull HudPlayer player)
      Adds this object to player.
      Parameters:
      player - target player
      Returns:
      whether to success or not
    • remove

      default boolean remove(@NotNull @NotNull HudPlayer player)
      Removes this object to player.
      Parameters:
      player - target player
      Returns:
      whether to success or not