Package me.croabeast.takion.message
Class TitleManager.Builder
java.lang.Object
me.croabeast.takion.message.TitleManager.Builder
- Enclosing interface:
TitleManager
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:
-
Method Details
-
setTicks
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 ticksstay- the stay ticksfadeOut- 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
sendTitlemethod is used. Otherwise, legacy packet-based title sending is attempted via reflection.- Parameters:
player- the target player to receive the title; must not benull- Returns:
trueif the title was sent successfully;falseotherwise
-