9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-06 15:51:52 +00:00

Removed pointless functionality from action bar

This commit is contained in:
Auxilor
2021-12-10 18:28:07 +00:00
parent b5bbabcc8b
commit 3e1e65a095

View File

@@ -8,17 +8,13 @@ import net.md_5.bungee.api.ChatMessageType
import net.md_5.bungee.api.chat.TextComponent
import org.bukkit.Bukkit
import org.bukkit.GameMode
import java.util.UUID
import java.util.*
object ActionBarUtils {
private val blacklist = mutableMapOf<UUID, Long>()
private val whitelist = mutableMapOf<UUID, Long>()
private val plugin = EcoSkillsPlugin.getInstance()
val ecoSkillsComponentSignature = StringUtils.toComponent(
"§t" // Literally a random character
)
fun blacklist(uuid: UUID) {
if (isWhitelisted(uuid)) {
return
@@ -59,13 +55,12 @@ object ActionBarUtils {
val message = plugin.configYml
.getString("persistent-action-bar.format", false)
val component = StringUtils.formatToComponent(message, player)
.append(ecoSkillsComponentSignature)
val component = StringUtils.format(message, player)
whitelistTemp(player.uniqueId)
player.spigot().sendMessage(
ChatMessageType.ACTION_BAR,
*TextComponent.fromLegacyText(StringUtils.toLegacy(component))
*TextComponent.fromLegacyText(component)
)
}
},