Add name function
This commit is contained in:
@@ -6,7 +6,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "xyz.lncvrt"
|
group = "xyz.lncvrt"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -3,8 +3,21 @@ package xyz.lncvrt.galaxyapi.utils
|
|||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
class MessageFormat {
|
class MessageFormat {
|
||||||
companion object {
|
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 {
|
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 {
|
fun setStaffPrefix(text: String): String {
|
||||||
|
|||||||
Reference in New Issue
Block a user