TitleManagerAPI

interface TitleManagerAPI

The API for TitleManager

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

Since

2.0.0

Functions

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

Adds an animation to the plugin.

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

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

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

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

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

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

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

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

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.

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.

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.

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.

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.

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.

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

Creates an animation from an Array of String.

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

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

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

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

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

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.

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

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

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

Gets the title of the given Player's scoreboard.

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.

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

Gives the Player a scoreboard as a sidebar.

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

Gives the Player a scoreboard as a sidebar.

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

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

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

Removes an animation from the plugin.

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

Removes the scoreboard sidebar from the given player.

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

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

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}.

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

Sends an actionbar message to the Player.

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

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

Sets the player list footer for the given Player.

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.

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

Set the player list header for the given Player.

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

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

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

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.

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.

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.

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.

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.

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

Link copied to clipboard