@@ -196,6 +196,26 @@ class Booster(
|
|||||||
"${hh}:${mm}:${ss}"
|
"${hh}:${mm}:${ss}"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PlaceholderManager.registerPlaceholder(
|
||||||
|
PlayerlessPlaceholder(
|
||||||
|
plugin,
|
||||||
|
"active_list",
|
||||||
|
) {
|
||||||
|
var activeList = mutableListOf<String>()
|
||||||
|
|
||||||
|
for(active in Bukkit.getServer().activeBoosters){
|
||||||
|
activeList.add(active.booster.name)
|
||||||
|
}
|
||||||
|
|
||||||
|
var outputString = plugin.langYml.getString("no-currently-active-list").formatEco(formatPlaceholders = false)
|
||||||
|
if (activeList.size > 0) {
|
||||||
|
outputString = activeList.joinToString(", ")
|
||||||
|
}
|
||||||
|
|
||||||
|
outputString
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
|
|||||||
@@ -18,4 +18,5 @@ messages:
|
|||||||
cannot-transmit: "&cYou can't transmit here!"
|
cannot-transmit: "&cYou can't transmit here!"
|
||||||
|
|
||||||
no-currently-active: "&cNot Active!"
|
no-currently-active: "&cNot Active!"
|
||||||
|
no-currently-active-list: "&cThere isn't any booster active!"
|
||||||
active-placeholder: "&fThanks %player% &ffor activating %booster%&f!"
|
active-placeholder: "&fThanks %player% &ffor activating %booster%&f!"
|
||||||
|
|||||||
Reference in New Issue
Block a user