Package net.md_5.bungee.api
Interface Title
-
public interface Title
Represents a configuration of a title. A title in Minecraft consists of a main title and a sub title. It willfadeIn(int)
,stay(int)
, andfadeOut(int)
for a specified amount of time. In most cases you will want toreset()
the current title first so your title won't be affected by a previous one.You can create a new configuration by calling
ProxyServer.createTitle()
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Title
clear()
Remove the currently displayed title from the player's screen.Title
fadeIn(int ticks)
Set the duration in ticks of the fade in effect of the title.Title
fadeOut(int ticks)
Set the duration in ticks of the fade out effect of the title.Title
reset()
Remove the currently displayed title from the player's screen and set the configuration back to the default values.Title
send(ProxiedPlayer player)
Send this title configuration to the specified player.Title
stay(int ticks)
Set the duration in ticks how long the title should stay on the screen.Title
subTitle(BaseComponent text)
Set the subtitle to send to the player.Title
subTitle(BaseComponent... text)
Set the subtitle to send to the player.Title
title(BaseComponent text)
Set the title to send to the player.Title
title(BaseComponent... text)
Set the title to send to the player.
-
-
-
Method Detail
-
title
Title title(BaseComponent text)
Set the title to send to the player.- Parameters:
text
- The text to use as the title.- Returns:
- This title configuration.
-
title
Title title(BaseComponent... text)
Set the title to send to the player.- Parameters:
text
- The text to use as the title.- Returns:
- This title configuration.
-
subTitle
Title subTitle(BaseComponent text)
Set the subtitle to send to the player.- Parameters:
text
- The text to use as the subtitle.- Returns:
- This title configuration.
-
subTitle
Title subTitle(BaseComponent... text)
Set the subtitle to send to the player.- Parameters:
text
- The text to use as the subtitle.- Returns:
- This title configuration.
-
fadeIn
Title fadeIn(int ticks)
Set the duration in ticks of the fade in effect of the title. Once this period of time is over the title will stay for the amount of time specified instay(int)
. The default value for the official Minecraft version is 20 (1 second).- Parameters:
ticks
- The amount of ticks (1/20 second) for the fade in effect.- Returns:
- This title configuration.
-
stay
Title stay(int ticks)
Set the duration in ticks how long the title should stay on the screen. Once this period of time is over the title will fade out using the duration specified infadeOut(int)
. The default value for the official Minecraft version is 60 (3 seconds).- Parameters:
ticks
- The amount of ticks (1/20 second) for the stay effect.- Returns:
- This title configuration.
-
fadeOut
Title fadeOut(int ticks)
Set the duration in ticks of the fade out effect of the title. The default value for the official Minecraft version is 20 (1 second).- Parameters:
ticks
- The amount of ticks (1/20 second) for the fade out effect.- Returns:
- This title configuration.
-
clear
Title clear()
Remove the currently displayed title from the player's screen. This will keep the currently used display times and will only remove the title.- Returns:
- This title configuration.
-
reset
Title reset()
Remove the currently displayed title from the player's screen and set the configuration back to the default values.- Returns:
- This title configuration.
-
send
Title send(ProxiedPlayer player)
Send this title configuration to the specified player. This is the same as callingProxiedPlayer.sendTitle(Title)
.- Parameters:
player
- The player to send the title to.- Returns:
- This title configuration.
-
-