Removed prefix from actionbar cooldown messages

This commit is contained in:
Auxilor 2021-07-22 23:31:24 +01:00
parent feb749afe9
commit 625f0c4832

View File

@ -253,13 +253,15 @@ public abstract class Spell extends EcoEnchant {
}
if (cooldown > 0) {
String message = this.getPlugin().getLangYml().getMessage("on-cooldown").replace("%seconds%", String.valueOf(cooldown)).replace("%name%", EnchantmentCache.getEntry(this).getRawName());
if (this.getPlugin().getConfigYml().getBool("types.special.cooldown-in-actionbar")) {
String message = this.getPlugin().getLangYml().getString("messages.on-cooldown").replace("%seconds%", String.valueOf(cooldown)).replace("%name%", EnchantmentCache.getEntry(this).getRawName());
player.spigot().sendMessage(
ChatMessageType.ACTION_BAR,
TextComponent.fromLegacyText(message)
);
} else {
String message = this.getPlugin().getLangYml().getMessage("on-cooldown").replace("%seconds%", String.valueOf(cooldown)).replace("%name%", EnchantmentCache.getEntry(this).getRawName());
player.sendMessage(message);
}
player.playSound(player.getLocation(), Sound.BLOCK_NOTE_BLOCK_BASS, 1, 0.5f);