Class TitleManager.Builder

java.lang.Object
me.croabeast.takion.message.TitleManager.Builder
Enclosing interface:
TitleManager

public static class TitleManager.Builder extends Object
A builder class for configuring and sending title messages to players.

The Builder allows you to fluently set the title, subtitle, and timing parameters (fade in, stay, fade out) for a title display. It then provides a method to send the configured title to a specified player.

See Also:
  • Player.sendTitle(String, String, int, int, int)
  • Method Details

    • setTicks

      public TitleManager.Builder setTicks(int fadeIn, int stay, int fadeOut)
      Sets the fade in, stay, and fade out ticks for the title.

      Each value is validated: fade in and fade out must be non-negative, and stay must be positive.

      Parameters:
      fadeIn - the fade in ticks
      stay - the stay ticks
      fadeOut - the fade out ticks
      Returns:
      this builder instance for method chaining
    • send

      public boolean send(org.bukkit.entity.Player player)
      Sends the title message to the specified player.

      If the server version supports it (version 11.0 or higher), the native sendTitle method is used. Otherwise, legacy packet-based title sending is attempted via reflection.

      Parameters:
      player - the target player to receive the title; must not be null
      Returns:
      true if the title was sent successfully; false otherwise