TitleManagerAPI

interface TitleManagerAPI

The API for TitleManager

Here you'll find all methods available in the API.

Since

2.0.0

Functions

addAnimation
Link copied to clipboard
abstract fun addAnimation(id: String, animation: Animation)

Adds an animation to the plugin.

clearActionbar
Link copied to clipboard
abstract fun clearActionbar(player: Player)

Removes an actionbar message that might be on the player's screen.

clearSubtitle
Link copied to clipboard
abstract fun clearSubtitle(player: Player)

Removes a subtitle that might be on the player's screen.

clearTitle
Link copied to clipboard
abstract fun clearTitle(player: Player)

Removes a title that might be on the player's screen.

clearTitles
Link copied to clipboard
abstract fun clearTitles(player: Player)

Removes a title and a subtitle that might be on the player's screen.

containsAnimation
Link copied to clipboard
abstract fun containsAnimation(text: String, animation: String): Boolean

Checks if the input text contains the pattern ${my-animation} or the pattern ${my-animation:parameter} where my-animation is the animation parameter.

containsAnimations
Link copied to clipboard
abstract fun containsAnimations(text: String): Boolean

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.

containsPlaceholder
Link copied to clipboard
abstract fun containsPlaceholder(text: String, placeholder: String): Boolean

Checks if the input text contains the pattern %{my-placeholder} or the pattern %{my-placeholder:parameter} where my-placeholder is the placeholder parameter.

containsPlaceholders
Link copied to clipboard
abstract fun containsPlaceholders(text: String): Boolean

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.

createAnimationFrame
Link copied to clipboard
abstract fun createAnimationFrame(text: String, fadeIn: Int, stay: Int, fadeOut: Int): AnimationFrame

Creates an Animation from the input text and timings values.

fromJavaScript
Link copied to clipboard
abstract fun fromJavaScript(name: String, input: String): Animation

Creates an Animation from the name of a loaded JavaScript animation, with the given input text.

fromText
Link copied to clipboard
abstract fun fromText(vararg frames: String): Animation

Creates an animation from an Array of String.

fromTextFile
Link copied to clipboard
abstract fun fromTextFile(file: File): Animation

Creates an animation from a File. Each line of the file will be converted to an Array and fed into the fromText

getFooter
Link copied to clipboard
abstract fun getFooter(player: Player): String

Gets the player list footer that is currently being displayed for the given Player.

getHeader
Link copied to clipboard
abstract fun getHeader(player: Player): String

Gets the player list header that is currently being displayed for the given Player.

getRegisteredAnimations
Link copied to clipboard
abstract fun getRegisteredAnimations(): Map<String, Animation>

Gets an immutable Map where the key is a String and value is a Animation.

getRegisteredScripts
Link copied to clipboard
abstract fun getRegisteredScripts(): Set<String>

Gets an immutable Set of all of the Script names registered.

getScoreboardTitle
Link copied to clipboard
abstract fun getScoreboardTitle(player: Player): String?

Gets the title of the given Player's scoreboard.

getScoreboardValue
Link copied to clipboard
abstract fun getScoreboardValue(player: Player, index: Int): String?

Gets the text value of the given Player's scoreboard at the given index.

giveDefaultScoreboard
Link copied to clipboard
abstract fun giveDefaultScoreboard(player: Player)

Gives the Player a scoreboard as a sidebar.

giveScoreboard
Link copied to clipboard
abstract fun giveScoreboard(player: Player)

Gives the Player a scoreboard as a sidebar.

hasScoreboard
Link copied to clipboard
abstract fun hasScoreboard(player: Player): Boolean

Checks whether or not the given Player has a scoreboard assigned.

removeAnimation
Link copied to clipboard
abstract fun removeAnimation(id: String)

Removes an animation from the plugin.

removeScoreboard
Link copied to clipboard
abstract fun removeScoreboard(player: Player)

Removes the scoreboard sidebar from the given player.

removeScoreboardValue
Link copied to clipboard
abstract fun removeScoreboardValue(player: Player, index: Int)

Removes the text value of the given Player's scoreboardat the given index.

replaceText
Link copied to clipboard
abstract fun replaceText(player: Player, text: String): String

Replaces the text with any placeholders that follow the pattern %{my-placeholder} as well as any placeholders following the pattern %{my-placeholder:my-parameter}.

sendActionbar
Link copied to clipboard
abstract fun sendActionbar(player: Player, text: String)

Sends an actionbar message to the Player.

sendActionbarWithPlaceholders
Link copied to clipboard
abstract fun sendActionbarWithPlaceholders(player: Player, text: String)

Sends an actionbar message to the Player where all placeholders are replaced.

sendProcessedActionbar
Link copied to clipboard
abstract fun sendProcessedActionbar(player: Player, text: String)

Sends an actionbar message to the Player where all placeholders are replaced. If animations or scripts are available, they will be shown.

sendProcessedSubtitle
Link copied to clipboard
abstract fun sendProcessedSubtitle(player: Player, subtitle: String, fadeIn: Int, stay: Int, fadeOut: Int)

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.

sendProcessedTitle
Link copied to clipboard
abstract fun sendProcessedTitle(player: Player, title: String, fadeIn: Int, stay: Int, fadeOut: Int)

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.

sendProcessedTitles
Link copied to clipboard
abstract fun sendProcessedTitles(player: Player, title: String, subtitle: String, fadeIn: Int, stay: Int, fadeOut: Int)

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.

sendSubtitle
Link copied to clipboard
abstract fun sendSubtitle(player: Player, subtitle: String)

Sends a subtitle message to the given Player. This will also use the last sent timings.

abstract fun sendSubtitle(player: Player, subtitle: String, fadeIn: Int, stay: Int, fadeOut: Int)

Sends a subtitle message to the given Player with the given timings as well as the given subtitles.

sendSubtitleWithPlaceholders
Link copied to clipboard
abstract fun sendSubtitleWithPlaceholders(player: Player, subtitle: String)

Sends a subtitle message to the given Player where all placeholders have been replaced. This will also use the last sent timings.

abstract fun sendSubtitleWithPlaceholders(player: Player, subtitle: String, fadeIn: Int, stay: Int, fadeOut: Int)

Sends a subtitle message to the given Player where all placeholders have been replaced and with the given timings.

sendTimings
Link copied to clipboard
abstract fun sendTimings(player: Player, fadeIn: Int, stay: Int, fadeOut: Int)

Sets the timings for all of the next titles and subtitles sent to the Player.

sendTitle
Link copied to clipboard
abstract fun sendTitle(player: Player, title: String)

Sends a title message to the given Player with the given title. This will also use the last sent timings.

abstract fun sendTitle(player: Player, title: String, fadeIn: Int, stay: Int, fadeOut: Int)

Sends a title message to the given Player with the given timings.

sendTitles
Link copied to clipboard
abstract fun sendTitles(player: Player, title: String, subtitle: String)

Sends a title and a subtitle message to the given Player.

abstract fun sendTitles(player: Player, title: String, subtitle: String, fadeIn: Int, stay: Int, fadeOut: Int)

Sends a title and a subtitle message to the given Player with the given timings.

sendTitlesWithPlaceholders
Link copied to clipboard
abstract fun sendTitlesWithPlaceholders(player: Player, title: String, subtitle: String)

Sends a title and a subtitle message to the given Player where all placeholders are replaced.

abstract fun sendTitlesWithPlaceholders(player: Player, title: String, subtitle: String, fadeIn: Int, stay: Int, fadeOut: Int)

Sends a title and a subtitle message to the given Player where all placeholders are replaced and with the given timings.

sendTitleWithPlaceholders
Link copied to clipboard
abstract fun sendTitleWithPlaceholders(player: Player, title: String)

Sends a title message to the given Player where all placeholders have been replaced. This will also use the last sent timings.

abstract fun sendTitleWithPlaceholders(player: Player, title: String, fadeIn: Int, stay: Int, fadeOut: Int)

Sends a title message to the given Player with the given timings where all placeholders have been replaced and with the given timings.

setFooter
Link copied to clipboard
abstract fun setFooter(player: Player, footer: String)

Sets the player list footer for the given Player.

setFooterWithPlaceholders
Link copied to clipboard
abstract fun setFooterWithPlaceholders(player: Player, footer: String)

Sets the player list footer for the given Player where all placeholders are replaced.

setHeader
Link copied to clipboard
abstract fun setHeader(player: Player, header: String)

Set the player list header for the given Player.

setHeaderAndFooter
Link copied to clipboard
abstract fun setHeaderAndFooter(player: Player, header: String, footer: String)

Sets the player list header and footer for the given Player.

setHeaderAndFooterWithPlaceholders
Link copied to clipboard
abstract fun setHeaderAndFooterWithPlaceholders(player: Player, header: String, footer: String)

Sets the player list header and footer for the given Player where all placeholders are replaced.

setHeaderWithPlaceholders
Link copied to clipboard
abstract fun setHeaderWithPlaceholders(player: Player, header: String)

Sets the player list header for the given Player where all placeholders are replaced.

setProcessedFooter
Link copied to clipboard
abstract fun setProcessedFooter(player: Player, footer: String)

Sets the player list footer for the given Player where all placeholders are replaced. If animations or scripts are available, they will be shown.

setProcessedHeader
Link copied to clipboard
abstract fun setProcessedHeader(player: Player, header: String)

Sets the player list header for the given Player where all placeholders are replaced. If animations or scripts are available, they will be shown.

setProcessedHeaderAndFooter
Link copied to clipboard
abstract fun setProcessedHeaderAndFooter(player: Player, header: String, footer: String)

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.

setProcessedScoreboardTitle
Link copied to clipboard
abstract fun setProcessedScoreboardTitle(player: Player, title: String)

Sets the title of the given Player's scoreboard, if they have one assigned.

setProcessedScoreboardValue
Link copied to clipboard
abstract fun setProcessedScoreboardValue(player: Player, index: Int, value: String)

Sets the text value of the given Player's scoreboard at the given index.

setScoreboardTitle
Link copied to clipboard
abstract fun setScoreboardTitle(player: Player, title: String)

Sets the title of the given Player's scoreboard, if they have one assigned.

setScoreboardTitleWithPlaceholders
Link copied to clipboard
abstract fun setScoreboardTitleWithPlaceholders(player: Player, title: String)

Sets the title of the given Player's scoreboard, if they have one assigned.

setScoreboardValue
Link copied to clipboard
abstract fun setScoreboardValue(player: Player, index: Int, value: String)

Sets the text value of the given Player's scoreboard at the given index.

setScoreboardValueWithPlaceholders
Link copied to clipboard
abstract fun setScoreboardValueWithPlaceholders(player: Player, index: Int, value: String)

Sets the text value of the given Player's scoreboard at the given index.

toActionbarAnimation
Link copied to clipboard
abstract fun toActionbarAnimation(animation: Animation, player: Player, withPlaceholders: Boolean): SendableAnimation
abstract fun toActionbarAnimation(parts: List<AnimationPart<*>>, player: Player, withPlaceholders: Boolean): SendableAnimation

Creates a SendableAnimation that sends Actionbar messages to the player.

toAnimationPart
Link copied to clipboard
abstract fun toAnimationPart(animation: Animation): AnimationPart<Animation>

Creates an AnimationPart from an Animation

abstract fun toAnimationPart(text: String): AnimationPart<String>

Creates an AnimationPart from a String

toAnimationParts
Link copied to clipboard
abstract fun toAnimationParts(text: String): List<AnimationPart<*>>

Converts the text found to an immutable list of AnimationParts with values of String or Animation

toFooterAnimation
Link copied to clipboard
abstract fun toFooterAnimation(animation: Animation, player: Player, withPlaceholders: Boolean): SendableAnimation
abstract fun toFooterAnimation(parts: List<AnimationPart<*>>, player: Player, withPlaceholders: Boolean): SendableAnimation

Creates a SendableAnimation that sets the Tab List footer.

toHeaderAnimation
Link copied to clipboard
abstract fun toHeaderAnimation(animation: Animation, player: Player, withPlaceholders: Boolean): SendableAnimation
abstract fun toHeaderAnimation(parts: List<AnimationPart<*>>, player: Player, withPlaceholders: Boolean): SendableAnimation

Creates a SendableAnimation that sets the Tab List header.

toScoreboardTitleAnimation
Link copied to clipboard
abstract fun toScoreboardTitleAnimation(animation: Animation, player: Player, withPlaceholders: Boolean): SendableAnimation
abstract fun toScoreboardTitleAnimation(parts: List<AnimationPart<*>>, player: Player, withPlaceholders: Boolean): SendableAnimation

Creates a SendableAnimation that sets the title for the player's scoreboard.

toScoreboardValueAnimation
Link copied to clipboard
abstract fun toScoreboardValueAnimation(animation: Animation, player: Player, index: Int, withPlaceholders: Boolean): SendableAnimation
abstract fun toScoreboardValueAnimation(parts: List<AnimationPart<*>>, player: Player, index: Int, withPlaceholders: Boolean): SendableAnimation

Creates a SendableAnimation that sets the text value for the player's scoreboard at the given index.

toSubtitleAnimation
Link copied to clipboard
abstract fun toSubtitleAnimation(animation: Animation, player: Player, withPlaceholders: Boolean): SendableAnimation
abstract fun toSubtitleAnimation(parts: List<AnimationPart<*>>, player: Player, withPlaceholders: Boolean): SendableAnimation

Creates a SendableAnimation that sends Subtitles to the player.

toTitleAnimation
Link copied to clipboard
abstract fun toTitleAnimation(animation: Animation, player: Player, withPlaceholders: Boolean): SendableAnimation
abstract fun toTitleAnimation(parts: List<AnimationPart<*>>, player: Player, withPlaceholders: Boolean): SendableAnimation

Creates a SendableAnimation that sends Titles to the player.

Sources

jvm source
Link copied to clipboard