Initial commit
This commit is contained in:
35
src/main/kotlin/xyz/lncvrt/chaosmcapi/utils/MessageFormat.kt
Normal file
35
src/main/kotlin/xyz/lncvrt/chaosmcapi/utils/MessageFormat.kt
Normal file
@@ -0,0 +1,35 @@
|
||||
package xyz.lncvrt.chaosmcapi.utils
|
||||
|
||||
@Suppress("unused")
|
||||
class MessageFormat {
|
||||
companion object {
|
||||
fun name(bold: Boolean): String {
|
||||
val name = "<gradient:#${Colors.SECONDARY}:#${Colors.PRIMARY}:#${Colors.SECONDARY}>ChaosMC</gradient>"
|
||||
return if (bold) {
|
||||
"<bold>${name}</bold>"
|
||||
} else {
|
||||
name
|
||||
}
|
||||
}
|
||||
|
||||
fun name(): String {
|
||||
return name(true)
|
||||
}
|
||||
|
||||
fun setPrefix(text: String): String {
|
||||
return "<bold>${name(false)} <gray>»</gray></bold> $text"
|
||||
}
|
||||
|
||||
fun setStaffPrefix(text: String): String {
|
||||
return "<bold>${name(false)} <gradient:green:dark_green:green>Staff Mode</gradient> <gray>»</gray></bold> $text"
|
||||
}
|
||||
|
||||
fun setPrimaryColor(text: String): String {
|
||||
return "<color:#${Colors.PRIMARY}>$text</color>"
|
||||
}
|
||||
|
||||
fun setSecondaryColor(text: String): String {
|
||||
return "<color:#${Colors.SECONDARY}>$text</color>"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user