public final class Title extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Title.Builder
A builder for creating titles
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_FADE_IN
The default number of ticks for the title to fade in.
|
static int |
DEFAULT_FADE_OUT
The default number of ticks for the title to fade out.
|
static int |
DEFAULT_STAY
The default number of ticks for the title to stay.
|
Constructor and Description |
---|
Title(net.md_5.bungee.api.chat.BaseComponent title)
Create a title with the default time values and no subtitle.
|
Title(net.md_5.bungee.api.chat.BaseComponent[] title)
Create a title with the default time values and no subtitle.
|
Title(net.md_5.bungee.api.chat.BaseComponent[] title,
net.md_5.bungee.api.chat.BaseComponent[] subtitle)
Create a title with the default time values.
|
Title(net.md_5.bungee.api.chat.BaseComponent[] title,
net.md_5.bungee.api.chat.BaseComponent[] subtitle,
int fadeIn,
int stay,
int fadeOut)
Creates a new title.
|
Title(net.md_5.bungee.api.chat.BaseComponent title,
net.md_5.bungee.api.chat.BaseComponent subtitle)
Create a title with the default time values.
|
Title(net.md_5.bungee.api.chat.BaseComponent title,
net.md_5.bungee.api.chat.BaseComponent subtitle,
int fadeIn,
int stay,
int fadeOut)
Creates a new title.
|
Title(String title)
Create a title with the default time values and no subtitle.
|
Title(String title,
String subtitle)
Create a title with the default time values.
|
Title(String title,
String subtitle,
int fadeIn,
int stay,
int fadeOut)
Creates a new title.
|
Modifier and Type | Method and Description |
---|---|
static Title.Builder |
builder() |
int |
getFadeIn()
Gets the number of ticks to fade in.
|
int |
getFadeOut()
Gets the number of ticks to fade out.
|
int |
getStay()
Gets the number of ticks to stay.
|
net.md_5.bungee.api.chat.BaseComponent[] |
getSubtitle()
Gets the text of this title's subtitle
|
net.md_5.bungee.api.chat.BaseComponent[] |
getTitle()
Gets the text of this title
|
public static final int DEFAULT_FADE_IN
public static final int DEFAULT_STAY
public static final int DEFAULT_FADE_OUT
public Title(net.md_5.bungee.api.chat.BaseComponent title)
Times use default values.
title
- the main text of the titleNullPointerException
- if the title is nullpublic Title(net.md_5.bungee.api.chat.BaseComponent[] title)
Times use default values.
title
- the main text of the titleNullPointerException
- if the title is nullpublic Title(String title)
Times use default values.
title
- the main text of the titleNullPointerException
- if the title is nullpublic Title(net.md_5.bungee.api.chat.BaseComponent title, net.md_5.bungee.api.chat.BaseComponent subtitle)
Times use default values.
title
- the main text of the titlesubtitle
- the secondary text of the titlepublic Title(net.md_5.bungee.api.chat.BaseComponent[] title, net.md_5.bungee.api.chat.BaseComponent[] subtitle)
Times use default values.
title
- the main text of the titlesubtitle
- the secondary text of the titlepublic Title(String title, String subtitle)
Times use default values.
title
- the main text of the titlesubtitle
- the secondary text of the titlepublic Title(net.md_5.bungee.api.chat.BaseComponent title, net.md_5.bungee.api.chat.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(net.md_5.bungee.api.chat.BaseComponent[] title, net.md_5.bungee.api.chat.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(String title, 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 outpublic net.md_5.bungee.api.chat.BaseComponent[] getTitle()
public net.md_5.bungee.api.chat.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 static Title.Builder builder()
Copyright © 2022. All rights reserved.