Add name function

This commit is contained in:
2025-04-09 22:20:55 -07:00
parent 2f024daac1
commit b034973c49
2 changed files with 15 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ plugins {
}
group = "xyz.lncvrt"
version = "1.0.2"
version = "1.0.3"
repositories {
mavenCentral()

View File

@@ -3,8 +3,21 @@ package xyz.lncvrt.galaxyapi.utils
@Suppress("unused")
class MessageFormat {
companion object {
fun name(bold: Boolean): String {
val name = "<gradient:#${Colors.PRIMARY}:#${Colors.SECONDARY}:#${Colors.PRIMARY}>GalaxyNetwork</gradient"
return if (bold) {
"<bold>${name}</bold>"
} else {
name
}
}
fun name() {
name(true)
}
fun setPrefix(text: String): String {
return "<bold><gradient:#${Colors.PRIMARY}:#${Colors.SECONDARY}:#${Colors.PRIMARY}>GalaxyNetwork</gradient> <gray>»</gray></bold> $text"
return "<bold>${name(false)} <gray>»</gray></bold> $text"
}
fun setStaffPrefix(text: String): String {