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 will
fadeIn(int)
, stay(int)
,
and fadeOut(int)
for a specified amount of time. In most cases you
will want to reset()
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
Modifier and TypeMethodDescriptionclear()
Remove the currently displayed title from the player's screen.fadeIn
(int ticks) Set the duration in ticks of the fade in effect of the title.fadeOut
(int ticks) Set the duration in ticks of the fade out effect of the title.reset()
Remove the currently displayed title from the player's screen and set the configuration back to the default values.send
(ProxiedPlayer player) Send this title configuration to the specified player.stay
(int ticks) Set the duration in ticks how long the title should stay on the screen.subTitle
(BaseComponent text) Set the subtitle to send to the player.subTitle
(BaseComponent... text) Set the subtitle to send to the player.title
(BaseComponent text) Set the title to send to the player.title
(BaseComponent... text) Set the title to send to the player.
-
Method Details
-
title
Set the title to send to the player.- Parameters:
text
- The text to use as the title.- Returns:
- This title configuration.
-
title
Set the title to send to the player.- Parameters:
text
- The text to use as the title.- Returns:
- This title configuration.
-
subTitle
Set the subtitle to send to the player.- Parameters:
text
- The text to use as the subtitle.- Returns:
- This title configuration.
-
subTitle
Set the subtitle to send to the player.- Parameters:
text
- The text to use as the subtitle.- Returns:
- This title configuration.
-
fadeIn
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
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
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
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.
-