public class Title extends Object
TitleBuilder
by calling
Titles.builder()
.
All properties of a title are optional - if they are not set it will use the current default values from the client.
Modifier and Type | Field and Description |
---|---|
protected boolean |
clear |
protected Optional<Integer> |
fadeIn |
protected Optional<Integer> |
fadeOut |
protected boolean |
reset |
protected Optional<Integer> |
stay |
protected Optional<Text> |
subtitle |
protected Optional<Text> |
title |
Modifier and Type | Method and Description |
---|---|
TitleBuilder |
builder()
Creates a new
TitleBuilder using the configuration of this
instance. |
boolean |
equals(Object o) |
Optional<Integer> |
getFadeIn()
Returns the specified time to fade in the title on the client.
|
Optional<Integer> |
getFadeOut()
Returns the specified time to fade out the title on the client.
|
Optional<Integer> |
getStay()
Returns the specified time how long the title should stay on the client.
|
Optional<Text> |
getSubtitle()
Returns the subtitle of this title configuration.
|
Optional<Text> |
getTitle()
Returns the title of this title configuration.
|
int |
hashCode() |
boolean |
isClear()
Returns whether this configuration is clearing the current title from the
screen.
|
boolean |
isReset()
Returns whether this configuration is clearing the current title from the
screen and resetting the current configuration to the default values.
|
String |
toString() |
public final Optional<Text> getTitle()
Text
of the title, if it was configuredpublic final Optional<Text> getSubtitle()
Text
of the subtitle, if it was configuredpublic final Optional<Integer> getFadeIn()
getStay()
.
The default value for Vanilla is 20 (1 second).
public final Optional<Integer> getStay()
getFadeOut()
.
The default value for Vanilla is 60 (3 second).
public final Optional<Integer> getFadeOut()
The default value for Vanilla is 20 (1 second).
public final boolean isClear()
public final boolean isReset()
This is recommended when you want to make sure to display a single title.
public TitleBuilder builder()
TitleBuilder
using the configuration of this
instance.