| Modifier and Type | Method and Description |
|---|---|
Title.Builder |
actionBar(Text actionBar)
Sets the action bar text to send to the player.
|
Title |
build()
Builds an immutable instance of the current configuration.
|
Title.Builder |
clear()
Removes the currently displayed title from the player's screen.
|
Title.Builder |
clear(boolean clear)
Sets whether the the currently displayed title should be removed from
the player's screen and will keep the currently used display times.
|
boolean |
equals(Object o) |
Title.Builder |
fadeIn(Integer fadeIn)
Sets the duration in ticks of the fade in effect of the title.
|
Title.Builder |
fadeOut(Integer fadeOut)
Sets the duration in ticks of the fade out effect of the title.
|
Optional<Text> |
getActionBar()
Returns the current action bar text of this builder.
|
Optional<Integer> |
getFadeIn()
Returns the current fade in effect time of the title.
|
Optional<Integer> |
getFadeOut()
Returns the current fade out effect time of the title.
|
Optional<Integer> |
getStay()
Returns the current stay effect time of the title.
|
Optional<Text> |
getSubtitle()
Returns the current subtitle of this builder.
|
Optional<Text> |
getTitle()
Returns the current title of this builder.
|
int |
hashCode() |
boolean |
isClear()
Returns whether this builder is currently configured to clear.
|
boolean |
isReset()
Returns whether this builder is currently configured to reset.
|
Title.Builder |
reset()
Removes the currently displayed title from the player's screen and
set the configuration back to the default values.
|
Title.Builder |
reset(boolean reset)
Sets whether the currently displayed title should be removed from the
player's screen and the configuration set back to the default values.
|
Title.Builder |
stay(Integer stay)
Sets the duration in ticks how long the title should stay on the
screen.
|
Title.Builder |
subtitle(Text subtitle)
Sets the subtitle to send to the player.
|
Title.Builder |
title(Text title)
Sets the title to send to the player.
|
String |
toString() |
public Optional<Text> getTitle()
Optional.empty() if noneTitle.getTitle()public Title.Builder title(@Nullable Text title)
title - The text to use as the title, or null to resetTitle.getTitle()public Optional<Text> getSubtitle()
Optional.empty() if noneTitle.getSubtitle()public Title.Builder subtitle(@Nullable Text subtitle)
subtitle - The text to use as the subtitle, or null to
resetTitle.getSubtitle()public Optional<Text> getActionBar()
Optional.empty() if noneTitle.getActionBar()public Title.Builder actionBar(@Nullable Text actionBar)
actionBar - The text to use for the action bar, or null
to resetTitle.getActionBar()public Optional<Integer> getFadeIn()
Optional.empty() if noneTitle.getFadeIn()public Title.Builder fadeIn(@Nullable Integer fadeIn)
stay(Integer).
The default value for Vanilla is 20 (1 second).
fadeIn - The amount of ticks (1/20 second) for the fade in
effect, or null to resetTitle.getFadeIn()public Optional<Integer> getStay()
Optional.empty() if noneTitle.getStay()public Title.Builder stay(@Nullable Integer stay)
fadeOut(Integer).
The default value for Vanilla is 60 (3 seconds).
stay - The amount of ticks (1/20 second) to stay, or
null to resetTitle.getStay()public Optional<Integer> getFadeOut()
Optional.empty() if
noneTitle.getFadeOut()public Title.Builder fadeOut(@Nullable Integer fadeOut)
The default value for Vanilla is 20 (1 second).
fadeOut - The amount of ticks (1/20 second) for the fade out
effect, or null to resetTitle.getFadeOut()public boolean isClear()
true if the title will clearTitle.isClear()public Title.Builder clear()
Title.isClear()public Title.Builder clear(boolean clear)
clear - Whether this title should clearTitle.isClear()public boolean isReset()
true if the title will resetTitle.isReset()public Title.Builder reset()
Title.isReset()public Title.Builder reset(boolean reset)
reset - Whether this title should resetTitle.isReset()public Title build()
Title with the currently configured
settings