New placeholders when casting skills.

This commit is contained in:
Ka0rX 2023-01-23 17:37:51 +01:00
parent a827c27ec2
commit c62d468991
2 changed files with 5 additions and 4 deletions

View File

@ -43,13 +43,14 @@ public class CastableSkill extends Skill {
// Cooldown check
if (skillMeta.getCaster().getData().getCooldownMap().isOnCooldown(this)) {
if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.on-cooldown").send(playerData.getPlayer());
if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.on-cooldown",
"cooldown",MythicLib.plugin.getMMOConfig().decimal.format(skillMeta.getCaster().getData().getCooldownMap().getCooldown(this))).send(playerData.getPlayer());
return false;
}
// Mana cost
if (playerData.getMana() < getModifier("mana")) {
if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.no-mana", "mana", playerData.getProfess().getManaDisplay().getName()).send(playerData.getPlayer());
if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.no-mana", "mana-required",MythicLib.plugin.getMMOConfig().decimal.format((getModifier("mana")-playerData.getMana())),"mana", playerData.getProfess().getManaDisplay().getName()).send(playerData.getPlayer());
return false;
}

View File

@ -57,9 +57,9 @@ casting:
no-stamina: '&6[{index}] &9&l{skill}'
split: '&7 &7 - &7 '
no-longer: '%&cYou cancelled skill casting.'
no-mana: '&cYou do not have enough {mana}!'
no-mana: '&cYou do not have enough {mana}, {mana-required} more required!'
no-stamina: '&cYou do not have enough stamina!'
on-cooldown: '&cThis skill is on cooldown.'
on-cooldown: '&cThis skill is on a {cooldown} cooldown.'
# Combat Log
now-in-combat: '%&cYou are now in combat!'