9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-02 05:46:57 +00:00

Disabling action bar now immediately clears it

This commit is contained in:
Auxilor
2021-11-30 08:46:57 +00:00
parent afc7f1e693
commit 4892fa7f85

View File

@@ -7,6 +7,8 @@ import com.willfp.eco.core.data.PlayerProfile
import com.willfp.eco.core.data.keys.PersistentDataKey
import com.willfp.eco.core.data.keys.PersistentDataKeyType
import com.willfp.eco.util.NamespacedKeyUtils
import net.md_5.bungee.api.ChatMessageType
import net.md_5.bungee.api.chat.TextComponent
import org.bukkit.command.CommandSender
import org.bukkit.entity.Player
@@ -32,6 +34,7 @@ class CommandToggleActionbar(plugin: EcoPlugin) : Subcommand(
if (currentStatus) {
player.sendMessage(plugin.langYml.getMessage("enabled-actionbar"))
} else {
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, *TextComponent.fromLegacyText(""))
player.sendMessage(plugin.langYml.getMessage("disabled-actionbar"))
}
}