mirror of
https://github.com/5vl/BetterSpigotAPI.git
synced 2025-05-24 10:37:01 +00:00
Added a string colorizer
This commit is contained in:
parent
6a3645e96b
commit
14b986d23b
16
src/main/java/me/fivevl/betterspigot/BetterText.kt
Normal file
16
src/main/java/me/fivevl/betterspigot/BetterText.kt
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package me.fivevl.betterspigot
|
||||||
|
|
||||||
|
import net.md_5.bungee.api.ChatColor
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 5vl
|
||||||
|
* @since 0.0.1
|
||||||
|
*/
|
||||||
|
object BetterText {
|
||||||
|
/**
|
||||||
|
* @return The color-translated string
|
||||||
|
*/
|
||||||
|
fun String.color(): String {
|
||||||
|
return ChatColor.translateAlternateColorCodes('&', this)
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user