public final class Titles extends Object
TitleBuilder
.Modifier and Type | Field and Description |
---|---|
static Title |
CLEAR |
static Title |
EMPTY |
static Title |
RESET |
Modifier and Type | Method and Description |
---|---|
static TitleBuilder |
builder()
Creates a new
Title configuration builder that will reset the
currently displayed Title on the client before displaying the new
configured one. |
static Title |
clear()
|
static Title |
of()
Returns a
Title that will simply do nothing when it is sent to
the client. |
static Title |
of(Text title)
Returns a
Title that will display the given main title on the
player's screen. |
static Title |
of(Text title,
Text subtitle)
Returns a
Title that will display the given main and subtitle on
the player's screen. |
static Title |
reset()
Returns a
Title that will reset the current title back to default
values on the client. |
static TitleBuilder |
update()
Creates a new empty
Title configuration builder. |
public static final Title EMPTY
public static final Title CLEAR
public static final Title RESET
public static Title of()
Title
that will simply do nothing when it is sent to
the client.public static Title of(Text title)
Title
that will display the given main title on the
player's screen.title
- The title to displaypublic static Title of(Text title, Text subtitle)
Title
that will display the given main and subtitle on
the player's screen.title
- The title to displaysubtitle
- The subtitle to displaypublic static Title clear()
public static Title reset()
Title
that will reset the current title back to default
values on the client.public static TitleBuilder builder()
Title
configuration builder that will reset the
currently displayed Title on the client before displaying the new
configured one.TitleBuilder
update()
public static TitleBuilder update()
Title
configuration builder. Unlike
builder()
this won't reset the current Title on the client before
displaying the current one. This has less use cases but should be used if
just the previously sent Title should be updated.TitleBuilder
builder()