Interface HudPlaceholder<T>

Type Parameters:
T - type (Number, String, Boolean)

public interface HudPlaceholder<T>
Represents placeholder
  • Method Details

    • invoke

      @NotNull @NotNull Function<HudPlayer,T> invoke(@NotNull @NotNull @Unmodifiable List<String> args, @NotNull @NotNull UpdateEvent reason)
      Creates new function from given args.
      Parameters:
      args - args
      reason - event
      Returns:
      function
      Throws:
      RuntimeException - if given args or reason is invalid.
    • getRequiredArgsLength

      int getRequiredArgsLength()
      Gets a length of required args.
      Returns:
      args length.
    • of

      @NotNull static <T> @NotNull HudPlaceholder<T> of(@NotNull @NotNull HudPlaceholder.PlaceholderFunction<T> biFunction)
      Creates new placeholder by function.
      Type Parameters:
      T - return value's type.
      Parameters:
      biFunction - builder
      Returns:
      an instance of placeholder.
    • builder

      static <T> HudPlaceholder.Builder<T> builder()
      Creates placeholder builder.
      Type Parameters:
      T - type (Number, String, Boolean)
      Returns:
      builder