-
- All Implemented Interfaces:
public interface TitleManagerAPI
The API for TitleManager<p/>
Here you'll find all methods available in the API.
-
-
Method Summary
Modifier and Type Method Description abstract String
replaceText(Player player, String text)
Replaces the text with any placeholders that follow the pattern %{my-placeholder}
as well as any placeholders following the pattern%{my-placeholder:my-parameter}
.abstract Boolean
containsPlaceholders(String text)
Checks if the input text contains any registered placeholders following the pattern %{my-placeholder}
as well as any placeholders following the pattern%{my-placeholder:my-parameter}
.abstract Boolean
containsPlaceholder(String text, String placeholder)
Checks if the input text contains the pattern %{my-placeholder}
or the pattern%{my-placeholder:parameter}
wheremy-placeholder
is the placeholder parameter.abstract Boolean
containsAnimations(String text)
Checks if the input text contains any registered animations following the pattern ${my-animation}
as well as any animations or scripts following the pattern${my-animation:my-parameter}
.abstract Boolean
containsAnimation(String text, String animation)
Checks if the input text contains the pattern ${my-animation}
or the pattern${my-animation:parameter}
wheremy-animation
is the animation parameter.abstract Map<String, Animation>
getRegisteredAnimations()
Gets an immutable Map where the key is a String and value is a Animation. abstract Set<String>
getRegisteredScripts()
Gets an immutable Set of all of the Script names registered. abstract Unit
addAnimation(String id, Animation animation)
Adds an animation to the plugin. abstract Unit
removeAnimation(String id)
Removes an animation from the plugin. abstract SendableAnimation
toTitleAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Titles to the player. abstract SendableAnimation
toTitleAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Titles to the player. abstract SendableAnimation
toSubtitleAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Subtitles to the player. abstract SendableAnimation
toSubtitleAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Subtitles to the player. abstract SendableAnimation
toActionbarAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Actionbar messages to the player. abstract SendableAnimation
toActionbarAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Actionbar messages to the player. abstract SendableAnimation
toHeaderAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the Tab List header. abstract SendableAnimation
toHeaderAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the Tab List header. abstract SendableAnimation
toFooterAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the Tab List footer. abstract SendableAnimation
toFooterAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the Tab List footer. abstract SendableAnimation
toScoreboardTitleAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the title for the player's scoreboard. abstract SendableAnimation
toScoreboardTitleAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the title for the player's scoreboard. abstract SendableAnimation
toScoreboardValueAnimation(Animation animation, Player player, Integer index, Boolean withPlaceholders)
Creates a SendableAnimation that sets the text value for the player's scoreboard at the given index. abstract SendableAnimation
toScoreboardValueAnimation(List<AnimationPart<?>> parts, Player player, Integer index, Boolean withPlaceholders)
Creates a SendableAnimation that sets the text value for the player's scoreboard at the given index. abstract AnimationPart<String>
toAnimationPart(String text)
Creates an AnimationPart from a String abstract AnimationPart<Animation>
toAnimationPart(Animation animation)
Creates an AnimationPart from an Animation abstract List<AnimationPart<?>>
toAnimationParts(String text)
Converts the text found to an immutable list of AnimationParts with values of String or AnimationAll plain text that follows the animation or script patterns will be converted to their respected Animations. abstract AnimationFrame
createAnimationFrame(String text, Integer fadeIn, Integer stay, Integer fadeOut)
Creates an Animation from the input text and timings values. abstract Animation
fromText(String frames)
Creates an animation from an Array of String. abstract Animation
fromTextFile(File file)
Creates an animation from a File. abstract Animation
fromJavaScript(String name, String input)
Creates an Animation from the name of a loaded JavaScript animation, with the given input text. abstract Unit
sendTitle(Player player, String title)
Sends a title message to the given Player with the given title. abstract Unit
sendTitle(Player player, String title, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title message to the given Player with the given timings. abstract Unit
sendTitleWithPlaceholders(Player player, String title)
Sends a title message to the given Player where all placeholders have been replaced. abstract Unit
sendTitleWithPlaceholders(Player player, String title, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title message to the given Player with the given timings where all placeholders have been replaced and with the given timings. abstract Unit
sendProcessedTitle(Player player, String title, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title message to the given Player with the given timings where all placeholders have been replaced and with the given timings. abstract Unit
sendSubtitle(Player player, String subtitle)
Sends a subtitle message to the given Player. abstract Unit
sendSubtitle(Player player, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a subtitle message to the given Player with the given timings as well as the given subtitles. abstract Unit
sendSubtitleWithPlaceholders(Player player, String subtitle)
Sends a subtitle message to the given Player where all placeholders have been replaced. abstract Unit
sendSubtitleWithPlaceholders(Player player, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a subtitle message to the given Player where all placeholders have been replaced and with the given timings. abstract Unit
sendProcessedSubtitle(Player player, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a subtitle message to the given Player where all placeholders have been replaced and with the given timings. abstract Unit
sendTitles(Player player, String title, String subtitle)
Sends a title and a subtitle message to the given Player. abstract Unit
sendTitles(Player player, String title, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title and a subtitle message to the given Player with the given timings. abstract Unit
sendTitlesWithPlaceholders(Player player, String title, String subtitle)
Sends a title and a subtitle message to the given Player where all placeholders are replaced. abstract Unit
sendTitlesWithPlaceholders(Player player, String title, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title and a subtitle message to the given Player where all placeholders are replaced and with the given timings. abstract Unit
sendProcessedTitles(Player player, String title, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title and a subtitle message to the given Player where all placeholders are replaced and with the given timings. abstract Unit
sendTimings(Player player, Integer fadeIn, Integer stay, Integer fadeOut)
Sets the timings for all of the next titles and subtitles sent to the Player. abstract Unit
clearTitle(Player player)
Removes a title that might be on the player's screen. abstract Unit
clearSubtitle(Player player)
Removes a subtitle that might be on the player's screen. abstract Unit
clearTitles(Player player)
Removes a title and a subtitle that might be on the player's screen. abstract Unit
sendActionbar(Player player, String text)
Sends an actionbar message to the Player. abstract Unit
sendActionbarWithPlaceholders(Player player, String text)
Sends an actionbar message to the Player where all placeholders are replaced. abstract Unit
sendProcessedActionbar(Player player, String text)
Sends an actionbar message to the Player where all placeholders are replaced. abstract Unit
clearActionbar(Player player)
Removes an actionbar message that might be on the player's screen. abstract Unit
setHeader(Player player, String header)
Set the player list header for the given Player. abstract Unit
setHeaderWithPlaceholders(Player player, String header)
Sets the player list header for the given Player where all placeholders are replaced. abstract Unit
setProcessedHeader(Player player, String header)
Sets the player list header for the given Player where all placeholders are replaced. abstract String
getHeader(Player player)
Gets the player list header that is currently being displayed for the given Player. abstract Unit
setFooter(Player player, String footer)
Sets the player list footer for the given Player. abstract Unit
setFooterWithPlaceholders(Player player, String footer)
Sets the player list footer for the given Player where all placeholders are replaced. abstract Unit
setProcessedFooter(Player player, String footer)
Sets the player list footer for the given Player where all placeholders are replaced. abstract String
getFooter(Player player)
Gets the player list footer that is currently being displayed for the given Player. abstract Unit
setHeaderAndFooter(Player player, String header, String footer)
Sets the player list header and footer for the given Player. abstract Unit
setHeaderAndFooterWithPlaceholders(Player player, String header, String footer)
Sets the player list header and footer for the given Player where all placeholders are replaced. abstract Unit
setProcessedHeaderAndFooter(Player player, String header, String footer)
Sets the player list header and footer for the given Player where all placeholders are replaced. abstract Unit
giveScoreboard(Player player)
Gives the Player a scoreboard as a sidebar. abstract Unit
giveDefaultScoreboard(Player player)
Gives the Player a scoreboard as a sidebar. abstract Unit
removeScoreboard(Player player)
Removes the scoreboard sidebar from the given player. abstract Boolean
hasScoreboard(Player player)
Checks whether or not the given Player has a scoreboard assigned. abstract Unit
setScoreboardTitle(Player player, String title)
Sets the title of the given Player's scoreboard, if they have one assigned. abstract Unit
setScoreboardTitleWithPlaceholders(Player player, String title)
Sets the title of the given Player's scoreboard, if they have one assigned. abstract Unit
setProcessedScoreboardTitle(Player player, String title)
Sets the title of the given Player's scoreboard, if they have one assigned. abstract String
getScoreboardTitle(Player player)
Gets the title of the given Player's scoreboard. abstract Unit
setScoreboardValue(Player player, Integer index, String value)
Sets the text value of the given Player's scoreboard at the given index. abstract Unit
setScoreboardValueWithPlaceholders(Player player, Integer index, String value)
Sets the text value of the given Player's scoreboard at the given index. abstract Unit
setProcessedScoreboardValue(Player player, Integer index, String value)
Sets the text value of the given Player's scoreboard at the given index. abstract String
getScoreboardValue(Player player, Integer index)
Gets the text value of the given Player's scoreboard at the given index. abstract Unit
removeScoreboardValue(Player player, Integer index)
Removes the text value of the given Player's scoreboardat the given index. -
-
Method Detail
-
replaceText
abstract String replaceText(Player player, String text)
Replaces the text with any placeholders that follow the pattern
%{my-placeholder}
as well as any placeholders following the pattern%{my-placeholder:my-parameter}
.If PlaceholderAPI is installed and enabled, any placeholders available within PlaceholderAPI will be replaced before TitleManager replaces its own.
- Parameters:
player
- The player that any player specific placeholders will be matched to.text
- The text that will be replaced.
-
containsPlaceholders
abstract Boolean containsPlaceholders(String text)
Checks if the input text contains any registered placeholders following the pattern
%{my-placeholder}
as well as any placeholders following the pattern%{my-placeholder:my-parameter}
. Though the placeholder does need to be registered with the plugin.- Parameters:
text
- The text that will be matched to the patterns.
-
containsPlaceholder
abstract Boolean containsPlaceholder(String text, String placeholder)
Checks if the input text contains the pattern
%{my-placeholder}
or the pattern%{my-placeholder:parameter}
wheremy-placeholder
is the placeholder parameter.- Parameters:
text
- The text that will be matched to the pattern.placeholder
- The placeholder that will be matched for.
-
containsAnimations
abstract Boolean containsAnimations(String text)
Checks if the input text contains any registered animations following the pattern
${my-animation}
as well as any animations or scripts following the pattern${my-animation:my-parameter}
. Though the animation or script does need to be registered with the plugin.- Parameters:
text
- The text that will be matched to the patterns.
-
containsAnimation
abstract Boolean containsAnimation(String text, String animation)
Checks if the input text contains the pattern
${my-animation}
or the pattern${my-animation:parameter}
wheremy-animation
is the animation parameter.- Parameters:
text
- The text that will be matched.animation
- The animation or script that will be matched for.
-
getRegisteredAnimations
abstract Map<String, Animation> getRegisteredAnimations()
-
getRegisteredScripts
abstract Set<String> getRegisteredScripts()
Gets an immutable Set of all of the Script names registered.
-
addAnimation
abstract Unit addAnimation(String id, Animation animation)
Adds an animation to the plugin.
- Parameters:
id
- The id of the animation (case-insensitive).animation
- The animation to be added.
-
removeAnimation
abstract Unit removeAnimation(String id)
Removes an animation from the plugin.
- Parameters:
id
- The id of the animation that should be removed (case-insensitive).
-
toTitleAnimation
abstract SendableAnimation toTitleAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Titles to the player.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
animation
- The animation to be used.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toTitleAnimation
abstract SendableAnimation toTitleAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Titles to the player.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
parts
- The parts of the animation the SendableAnimation will be made off of.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toSubtitleAnimation
abstract SendableAnimation toSubtitleAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Subtitles to the player.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
animation
- The animation to be used.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toSubtitleAnimation
abstract SendableAnimation toSubtitleAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Subtitles to the player.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
parts
- The parts of the animation the SendableAnimation will be made off of.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toActionbarAnimation
abstract SendableAnimation toActionbarAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Actionbar messages to the player.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
animation
- The animation to be used.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toActionbarAnimation
abstract SendableAnimation toActionbarAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sends Actionbar messages to the player.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
parts
- The parts of the animation the SendableAnimation will be made off of.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toHeaderAnimation
abstract SendableAnimation toHeaderAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the Tab List header.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
animation
- The animation to be used.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toHeaderAnimation
abstract SendableAnimation toHeaderAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the Tab List header.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
parts
- The parts of the animation the SendableAnimation will be made off of.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toFooterAnimation
abstract SendableAnimation toFooterAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the Tab List footer.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
animation
- The animation to be used.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toFooterAnimation
abstract SendableAnimation toFooterAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the Tab List footer.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
parts
- The parts of the animation the SendableAnimation will be made off of.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toScoreboardTitleAnimation
abstract SendableAnimation toScoreboardTitleAnimation(Animation animation, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the title for the player's scoreboard.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
animation
- The animation to be used.player
- The player the SendableAnimation is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toScoreboardTitleAnimation
abstract SendableAnimation toScoreboardTitleAnimation(List<AnimationPart<?>> parts, Player player, Boolean withPlaceholders)
Creates a SendableAnimation that sets the title for the player's scoreboard.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
parts
- The animation parts to be used.player
- The player the List of AnimationParts is associated with.withPlaceholders
- Whether or not placeholders should be replaced.
-
toScoreboardValueAnimation
abstract SendableAnimation toScoreboardValueAnimation(Animation animation, Player player, Integer index, Boolean withPlaceholders)
Creates a SendableAnimation that sets the text value for the player's scoreboard at the given index.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
animation
- The animation to be used.player
- The player the SendableAnimation is associated with.index
- The index the text value should be set to.withPlaceholders
- Whether or not placeholders should be replaced.
-
toScoreboardValueAnimation
abstract SendableAnimation toScoreboardValueAnimation(List<AnimationPart<?>> parts, Player player, Integer index, Boolean withPlaceholders)
Creates a SendableAnimation that sets the text value for the player's scoreboard at the given index.
If
withPlaceholders
is true, placeholders will be replaced.- Parameters:
parts
- The animation to be used.player
- The player the SendableAnimation is associated with.index
- The index the text value should be set to.withPlaceholders
- Whether or not placeholders should be replaced.
-
toAnimationPart
abstract AnimationPart<String> toAnimationPart(String text)
Creates an AnimationPart from a String
- Parameters:
text
- The String that will be the value of the AnimationPart.
-
toAnimationPart
abstract AnimationPart<Animation> toAnimationPart(Animation animation)
Creates an AnimationPart from an Animation
- Parameters:
animation
- The Animation that will be the value of the AnimationPart.
-
toAnimationParts
abstract List<AnimationPart<?>> toAnimationParts(String text)
Converts the text found to an immutable list of AnimationParts with values of String or Animation
All plain text that follows the animation or script patterns will be converted to their respected Animations.
- Parameters:
text
- The text to be converted.
-
createAnimationFrame
abstract AnimationFrame createAnimationFrame(String text, Integer fadeIn, Integer stay, Integer fadeOut)
Creates an Animation from the input text and timings values.
All timings are measured in ticks.
- Parameters:
text
- The input text to be displayed.fadeIn
- If the frame is being used in a title, this is the time it takes for the title to fade onto the screen.stay
- The time it takes for the frame to stay on the screen.fadeOut
- If the frame is being used in a title, this is the time it takes for the title to fade off of the screen.
-
fromText
abstract Animation fromText(String frames)
Creates an animation from an Array of String.
Each line must follow the pattern
[fade-in;stay;fade-out]text
fade-in = The time it takes for a title to fade onto the screen. If the frame is not used in a title, it will be added onto the stay time instead.
stay = The time it takes for the frame to stay on the screen.
fade-out = The time it takes for a title to fade off of the screen. If the frame is not used in a title, it will be added onto the stay time instead.
- Parameters:
frames
- The frames that will be converted to String
-
fromTextFile
abstract Animation fromTextFile(File file)
Creates an animation from a File. Each line of the file will be converted to an Array and fed into the fromText
Each line must follow the pattern
[fade-in;stay;fade-out]text
fade-in = The time it takes for a title to fade onto the screen. If the frame is not used in a title, it will be added onto the stay time instead.
stay = The time it takes for the frame to stay on the screen.
fade-out = The time it takes for a title to fade off of the screen. If the frame is not used in a title, it will be added onto the stay time instead.
- Parameters:
file
- The file that will be read and converted to an Animation.
-
fromJavaScript
abstract Animation fromJavaScript(String name, String input)
Creates an Animation from the name of a loaded JavaScript animation, with the given input text.
- Parameters:
name
- The name of the JavaScript animation.input
- The input text to be converted to an Animation
-
sendTitle
abstract Unit sendTitle(Player player, String title)
Sends a title message to the given Player with the given title. This will also use the last sent timings.
- Parameters:
player
- The player the title should be sent to.title
- The title to be displayed.
-
sendTitle
abstract Unit sendTitle(Player player, String title, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title message to the given Player with the given timings.
- Parameters:
player
- The player the title should be sent to.title
- The title to be sent to the Player.fadeIn
- The time it takes for the title to fade onto the screen.stay
- The time it takes for the title to stay on the screen.fadeOut
- The time it takes for the title to fade off of the screen.
-
sendTitleWithPlaceholders
abstract Unit sendTitleWithPlaceholders(Player player, String title)
Sends a title message to the given Player where all placeholders have been replaced. This will also use the last sent timings.
- Parameters:
player
- The player the title should be sent to.title
- The title to be sent to the Player.
-
sendTitleWithPlaceholders
abstract Unit sendTitleWithPlaceholders(Player player, String title, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title message to the given Player with the given timings where all placeholders have been replaced and with the given timings.
- Parameters:
player
- The player the title should be sent to.title
- The title to be sent to the Player.fadeIn
- The time it takes for the title to fade onto the screen.stay
- The time it takes for the title to stay on the screen.fadeOut
- The time it takes for the title to fade off of the screen.
-
sendProcessedTitle
abstract Unit sendProcessedTitle(Player player, String title, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title message to the given Player with the given timings where all placeholders have been replaced and with the given timings. If animations or scripts are available, they will be shown.
- Parameters:
player
- The player the title should be sent to.title
- The title to be sent to the Player.fadeIn
- The time it takes for the title to fade onto the screen.stay
- The time it takes for the title to stay on the screen.fadeOut
- The time it takes for the title to fade off of the screen.
-
sendSubtitle
abstract Unit sendSubtitle(Player player, String subtitle)
Sends a subtitle message to the given Player. This will also use the last sent timings.
- Parameters:
player
- The player the subtitle should be sent to.subtitle
- The subtitle to be displayed.
-
sendSubtitle
abstract Unit sendSubtitle(Player player, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a subtitle message to the given Player with the given timings as well as the given subtitles.
- Parameters:
player
- The player the subtitle should be sent to.subtitle
- The subtitle to be displayed.fadeIn
- The time it takes for the subtitle to fade onto the screen.stay
- The time it takes for the subtitle to stay on the screen.fadeOut
- The time it takes for the subtitle to fade off of the screen.
-
sendSubtitleWithPlaceholders
abstract Unit sendSubtitleWithPlaceholders(Player player, String subtitle)
Sends a subtitle message to the given Player where all placeholders have been replaced. This will also use the last sent timings.
- Parameters:
player
- The player the subtitle should be sent to.subtitle
- The subtitle to be displayed.
-
sendSubtitleWithPlaceholders
abstract Unit sendSubtitleWithPlaceholders(Player player, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a subtitle message to the given Player where all placeholders have been replaced and with the given timings.
- Parameters:
player
- The player the subtitle should be sent to.subtitle
- The subtitle to be displayed.fadeIn
- The time it takes for the subtitle to fade onto the screen.stay
- The time it takes for the subtitle to stay on the screen.fadeOut
- The time it takes for the subtitle to fade off of the screen.
-
sendProcessedSubtitle
abstract Unit sendProcessedSubtitle(Player player, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a subtitle message to the given Player where all placeholders have been replaced and with the given timings. If animations or scripts are available, they will be shown.
- Parameters:
player
- The player the subtitle should be sent to.subtitle
- The subtitle to be displayed.fadeIn
- The time it takes for the subtitle to fade onto the screen.stay
- The time it takes for the subtitle to stay on the screen.fadeOut
- The time it takes for the subtitle to fade off of the screen.
-
sendTitles
abstract Unit sendTitles(Player player, String title, String subtitle)
Sends a title and a subtitle message to the given Player.
- Parameters:
player
- The player the titles should be sent to.title
- The title to be displayed.subtitle
- The subtitle to be displayed.
-
sendTitles
abstract Unit sendTitles(Player player, String title, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title and a subtitle message to the given Player with the given timings.
- Parameters:
player
- The player the titles should be sent to.title
- The title to be displayed.subtitle
- The subtitle to be displayed.fadeIn
- The time it takes for the titles to fade onto the screen.stay
- The time it takes for the titles to stay on the screen.fadeOut
- The time it takes for the titles to fade off of the screen.
-
sendTitlesWithPlaceholders
abstract Unit sendTitlesWithPlaceholders(Player player, String title, String subtitle)
Sends a title and a subtitle message to the given Player where all placeholders are replaced.
- Parameters:
player
- The player the titles should be sent to.title
- The title to be displayed.subtitle
- The subtitle to be displayed.
-
sendTitlesWithPlaceholders
abstract Unit sendTitlesWithPlaceholders(Player player, String title, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title and a subtitle message to the given Player where all placeholders are replaced and with the given timings.
- Parameters:
player
- The player the titles should be sent to.title
- The title to be displayed.subtitle
- The subtitle to be displayed.fadeIn
- The time it takes for the titles to fade onto the screen.stay
- The time it takes for the titles to stay on the screen.fadeOut
- The time it takes for the titles to fade off of the screen.
-
sendProcessedTitles
abstract Unit sendProcessedTitles(Player player, String title, String subtitle, Integer fadeIn, Integer stay, Integer fadeOut)
Sends a title and a subtitle message to the given Player where all placeholders are replaced and with the given timings. If animations or scripts are available, they will be shown.
- Parameters:
player
- The player the titles should be sent to.title
- The title to be displayed.subtitle
- The subtitle to be displayed.fadeIn
- The time it takes for the titles to fade onto the screen.stay
- The time it takes for the titles to stay on the screen.fadeOut
- The time it takes for the titles to fade off of the screen.
-
sendTimings
abstract Unit sendTimings(Player player, Integer fadeIn, Integer stay, Integer fadeOut)
Sets the timings for all of the next titles and subtitles sent to the Player.
- Parameters:
player
- The player the timings should be set for.fadeIn
- The time it takes for all titles sent afterwards to fade onto the screen.stay
- The time it takes for all titles sent afterwards to stay on the screen.fadeOut
- The time it takes for all titles sent afterwards to to fade off of the screen.
-
clearTitle
abstract Unit clearTitle(Player player)
Removes a title that might be on the player's screen.
- Parameters:
player
- The player to clear.
-
clearSubtitle
abstract Unit clearSubtitle(Player player)
Removes a subtitle that might be on the player's screen.
- Parameters:
player
- The player to clear.
-
clearTitles
abstract Unit clearTitles(Player player)
Removes a title and a subtitle that might be on the player's screen.
- Parameters:
player
- The player to clear.
-
sendActionbar
abstract Unit sendActionbar(Player player, String text)
Sends an actionbar message to the Player.
- Parameters:
player
- The player to send the actionbar message.text
- The text to be sent.
-
sendActionbarWithPlaceholders
abstract Unit sendActionbarWithPlaceholders(Player player, String text)
Sends an actionbar message to the Player where all placeholders are replaced.
- Parameters:
player
- The player to send the actionbar message.text
- The text to be sent.
-
sendProcessedActionbar
abstract Unit sendProcessedActionbar(Player player, String text)
Sends an actionbar message to the Player where all placeholders are replaced. If animations or scripts are available, they will be shown.
- Parameters:
player
- The player to send the actionbar message.text
- The text to be sent.
-
clearActionbar
abstract Unit clearActionbar(Player player)
Removes an actionbar message that might be on the player's screen.
- Parameters:
player
- The player to clear.
-
setHeader
abstract Unit setHeader(Player player, String header)
Set the player list header for the given Player.
- Parameters:
player
- The player to set the header for.header
- The header to be displayed.
-
setHeaderWithPlaceholders
abstract Unit setHeaderWithPlaceholders(Player player, String header)
Sets the player list header for the given Player where all placeholders are replaced.
- Parameters:
player
- The player to set the header for.header
- The header to be displayed.
-
setProcessedHeader
abstract Unit setProcessedHeader(Player player, String header)
Sets the player list header for the given Player where all placeholders are replaced. If animations or scripts are available, they will be shown.
- Parameters:
player
- The player to set the header for.header
- The header to be displayed.
-
getHeader
abstract String getHeader(Player player)
Gets the player list header that is currently being displayed for the given Player.
- Parameters:
player
- The player to get the header from.
-
setFooter
abstract Unit setFooter(Player player, String footer)
Sets the player list footer for the given Player.
- Parameters:
player
- The player to set the footer for.footer
- The footer to be displayed.
-
setFooterWithPlaceholders
abstract Unit setFooterWithPlaceholders(Player player, String footer)
Sets the player list footer for the given Player where all placeholders are replaced.
- Parameters:
player
- The player to set the footer for.footer
- The footer to be displayed.
-
setProcessedFooter
abstract Unit setProcessedFooter(Player player, String footer)
Sets the player list footer for the given Player where all placeholders are replaced. If animations or scripts are available, they will be shown.
- Parameters:
player
- The player to set the footer for.footer
- The footer to be displayed.
-
getFooter
abstract String getFooter(Player player)
Gets the player list footer that is currently being displayed for the given Player.
- Parameters:
player
- The player to get the header from.
-
setHeaderAndFooter
abstract Unit setHeaderAndFooter(Player player, String header, String footer)
Sets the player list header and footer for the given Player.
- Parameters:
player
- The player to get and set the footer for.header
- The header to be displayed.footer
- The footer to be displayed.
-
setHeaderAndFooterWithPlaceholders
abstract Unit setHeaderAndFooterWithPlaceholders(Player player, String header, String footer)
Sets the player list header and footer for the given Player where all placeholders are replaced.
- Parameters:
player
- The player to get and set the footer for.header
- The header to be displayed.footer
- The footer to be displayed.
-
setProcessedHeaderAndFooter
abstract Unit setProcessedHeaderAndFooter(Player player, String header, String footer)
Sets the player list header and footer for the given Player where all placeholders are replaced. If animations or scripts are available, they will be shown.
- Parameters:
player
- The player to get and set the footer for.header
- The header to be displayed.footer
- The footer to be displayed.
-
giveScoreboard
abstract Unit giveScoreboard(Player player)
Gives the Player a scoreboard as a sidebar.
The scoreboard won't be displayed until at least one value has been added.
- Parameters:
player
- The player the scoreboard should be given to.
-
giveDefaultScoreboard
abstract Unit giveDefaultScoreboard(Player player)
Gives the Player a scoreboard as a sidebar.
Gives you the TitleManager's own Scoreboard found in the config file.
- Parameters:
player
- The player the scoreboard should be given to.
-
removeScoreboard
abstract Unit removeScoreboard(Player player)
Removes the scoreboard sidebar from the given player.
- Parameters:
player
- The player the scoreboard should be removed from.
-
hasScoreboard
abstract Boolean hasScoreboard(Player player)
Checks whether or not the given Player has a scoreboard assigned.
- Parameters:
player
- The player to check for.
-
setScoreboardTitle
abstract Unit setScoreboardTitle(Player player, String title)
Sets the title of the given Player's scoreboard, if they have one assigned.
- Parameters:
player
- The player to set the title for.title
- The title to be set.
-
setScoreboardTitleWithPlaceholders
abstract Unit setScoreboardTitleWithPlaceholders(Player player, String title)
Sets the title of the given Player's scoreboard, if they have one assigned.
If placeholders are available, the title will try to replace them.
- Parameters:
player
- The player to set the title for.title
- The title to be set.
-
setProcessedScoreboardTitle
abstract Unit setProcessedScoreboardTitle(Player player, String title)
Sets the title of the given Player's scoreboard, if they have one assigned.
If placeholders are available, the title will try to replace them. If animations or scripts are available, they will be shown.
- Parameters:
player
- The player to set the title for.title
- The title to be set.
-
getScoreboardTitle
abstract String getScoreboardTitle(Player player)
Gets the title of the given Player's scoreboard.
- Parameters:
player
- The player to get the title from.
-
setScoreboardValue
abstract Unit setScoreboardValue(Player player, Integer index, String value)
Sets the text value of the given Player's scoreboard at the given index.
- Parameters:
player
- The player to set the text value for.index
- The index at which the text should be set.value
- The text value that should be set.
-
setScoreboardValueWithPlaceholders
abstract Unit setScoreboardValueWithPlaceholders(Player player, Integer index, String value)
Sets the text value of the given Player's scoreboard at the given index.
If placeholders are available, the value will try to replace them.
- Parameters:
player
- The player to set the text value for.index
- The index at which the text should be set.value
- The text value that should be set.
-
setProcessedScoreboardValue
abstract Unit setProcessedScoreboardValue(Player player, Integer index, String value)
Sets the text value of the given Player's scoreboard at the given index.
If placeholders are available, the value will try to replace them. If animations or scripts are available, they will be shown.
- Parameters:
player
- The player to set the text value for.index
- The index at which the text should be set.value
- The text value that should be set.
-
getScoreboardValue
abstract String getScoreboardValue(Player player, Integer index)
Gets the text value of the given Player's scoreboard at the given index.
- Parameters:
player
- The player to get the text value from.index
- The index at which the text value is present.
-
removeScoreboardValue
abstract Unit removeScoreboardValue(Player player, Integer index)
Removes the text value of the given Player's scoreboardat the given index.
- Parameters:
player
- The player to remove the text value from.index
- The index at which the text value should be removed.
-
-
-
-