Title
@Deprecated public final class Title extends Object
Player
.
A title can be sent without subtitle text.
Modifier and Type | Class and Description |
---|---|
static class |
Title.Builder
Deprecated.
A builder for creating titles
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_FADE_IN
Deprecated.
The default number of ticks for the title to fade in.
|
static int |
DEFAULT_FADE_OUT
Deprecated.
The default number of ticks for the title to fade out.
|
static int |
DEFAULT_STAY
Deprecated.
The default number of ticks for the title to stay.
|
Constructor and Description |
---|
Title(@NotNull BaseComponent title)
Deprecated.
Create a title with the default time values and no subtitle.
|
Title(@NotNull BaseComponent[] title)
Deprecated.
Create a title with the default time values and no subtitle.
|
Title(@NotNull BaseComponent[] title,
@Nullable BaseComponent[] subtitle)
Deprecated.
Create a title with the default time values.
|
Title(@Nullable BaseComponent[] title,
@NotNull BaseComponent[] subtitle,
int fadeIn,
int stay,
int fadeOut)
Deprecated.
Creates a new title.
|
Title(@NotNull BaseComponent title,
@Nullable BaseComponent subtitle)
Deprecated.
Create a title with the default time values.
|
Title(@NotNull BaseComponent title,
@Nullable BaseComponent subtitle,
int fadeIn,
int stay,
int fadeOut)
Deprecated.
Creates a new title.
|
Title(@NotNull String title)
Deprecated.
Create a title with the default time values and no subtitle.
|
Title(@NotNull String title,
@Nullable String subtitle)
Deprecated.
Create a title with the default time values.
|
Title(@NotNull String title,
@Nullable String subtitle,
int fadeIn,
int stay,
int fadeOut)
Deprecated.
Creates a new title.
|
Modifier and Type | Method and Description |
---|---|
void |
broadcast()
Deprecated.
Sends the title directly to all online players
|
static @NotNull Title.Builder |
builder()
Deprecated.
|
int |
getFadeIn()
Deprecated.
Gets the number of ticks to fade in.
|
int |
getFadeOut()
Deprecated.
Gets the number of ticks to fade out.
|
int |
getStay()
Deprecated.
Gets the number of ticks to stay.
|
@Nullable BaseComponent[] |
getSubtitle()
Deprecated.
Gets the text of this title's subtitle
|
@NotNull BaseComponent[] |
getTitle()
Deprecated.
Gets the text of this title
|
void |
send(@NotNull Collection<? extends Player> players)
Deprecated.
Sends the title directly to the defined players
|
void |
send(@NotNull Player player)
Deprecated.
Sends the title directly to an player
|
void |
send(@NotNull Player[] players)
Deprecated.
Sends the title directly to the defined players
|
public static final int DEFAULT_FADE_IN
public static final int DEFAULT_STAY
public static final int DEFAULT_FADE_OUT
public Title(@NotNull @NotNull BaseComponent title)
Times use default values.
title
- the main text of the titleNullPointerException
- if the title is nullpublic Title(@NotNull @NotNull BaseComponent[] title)
Times use default values.
title
- the main text of the titleNullPointerException
- if the title is nullpublic Title(@NotNull @NotNull String title)
Times use default values.
title
- the main text of the titleNullPointerException
- if the title is nullpublic Title(@NotNull @NotNull BaseComponent title, @Nullable @Nullable BaseComponent subtitle)
Times use default values.
title
- the main text of the titlesubtitle
- the secondary text of the titlepublic Title(@NotNull @NotNull BaseComponent[] title, @Nullable @Nullable BaseComponent[] subtitle)
Times use default values.
title
- the main text of the titlesubtitle
- the secondary text of the titlepublic Title(@NotNull @NotNull String title, @Nullable @Nullable String subtitle)
Times use default values.
title
- the main text of the titlesubtitle
- the secondary text of the titlepublic Title(@NotNull @NotNull BaseComponent title, @Nullable @Nullable BaseComponent subtitle, int fadeIn, int stay, int fadeOut)
title
- the main text of the titlesubtitle
- the secondary text of the titlefadeIn
- the number of ticks for the title to fade instay
- the number of ticks for the title to stay on screenfadeOut
- the number of ticks for the title to fade outIllegalArgumentException
- if any of the times are negativepublic Title(@Nullable @Nullable BaseComponent[] title, @NotNull @NotNull BaseComponent[] subtitle, int fadeIn, int stay, int fadeOut)
title
- the main text of the titlesubtitle
- the secondary text of the titlefadeIn
- the number of ticks for the title to fade instay
- the number of ticks for the title to stay on screenfadeOut
- the number of ticks for the title to fade outIllegalArgumentException
- if any of the times are negativepublic Title(@NotNull @NotNull String title, @Nullable @Nullable String subtitle, int fadeIn, int stay, int fadeOut)
It is recommended to the BaseComponent
constrctors.
title
- the main text of the titlesubtitle
- the secondary text of the titlefadeIn
- the number of ticks for the title to fade instay
- the number of ticks for the title to stay on screenfadeOut
- the number of ticks for the title to fade out@NotNull public @NotNull BaseComponent[] getTitle()
@Nullable public @Nullable BaseComponent[] getSubtitle()
public int getFadeIn()
The returned value is never negative.
public int getStay()
The returned value is never negative.
public int getFadeOut()
The returned value is never negative.
public void send(@NotNull @NotNull Player player)
player
- the receiver of the titlepublic void send(@NotNull @NotNull Collection<? extends Player> players)
players
- the receivers of the titlepublic void send(@NotNull @NotNull Player[] players)
players
- the receivers of the titlepublic void broadcast()
@NotNull public static @NotNull Title.Builder builder()
Copyright © 2021. All rights reserved.