mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-23 00:05:52 +01:00
Added placeholder %mmocore_cooldown_bound_<slot>% according to issue #890.
This commit is contained in:
parent
65d6047017
commit
a76d77fe47
@ -129,9 +129,17 @@ public class RPGPlaceholders extends PlaceholderExpansion {
|
|||||||
|
|
||||||
else if (identifier.startsWith("bound_")) {
|
else if (identifier.startsWith("bound_")) {
|
||||||
int slot = Math.max(0, Integer.parseInt(identifier.substring(6)));
|
int slot = Math.max(0, Integer.parseInt(identifier.substring(6)));
|
||||||
return playerData.hasSkillBound(slot) ? playerData.getBoundSkill(slot).getSkill().getName()
|
if (playerData.hasSkillBound(slot)) {
|
||||||
: MMOCore.plugin.configManager.noSkillBoundPlaceholder;
|
ClassSkill skill = playerData.getBoundSkill(slot);
|
||||||
|
return (playerData.getCooldownMap().isOnCooldown(skill) ? ChatColor.RED : ChatColor.GREEN) + skill.getSkill().getName();
|
||||||
|
} else
|
||||||
|
return MMOCore.plugin.configManager.noSkillBoundPlaceholder;
|
||||||
|
} else if (identifier.startsWith("cooldown_bound_")) {
|
||||||
|
int slot = Math.max(0, Integer.parseInt(identifier.substring(15)));
|
||||||
|
if (playerData.hasSkillBound(slot))
|
||||||
|
return "" + playerData.getCooldownMap().getCooldown(playerData.getBoundSkill(slot));
|
||||||
|
else
|
||||||
|
return MMOCore.plugin.configManager.noSkillBoundPlaceholder;
|
||||||
} else if (identifier.startsWith("profession_experience_"))
|
} else if (identifier.startsWith("profession_experience_"))
|
||||||
return MythicLib.plugin.getMMOConfig().decimal.format(
|
return MythicLib.plugin.getMMOConfig().decimal.format(
|
||||||
playerData.getCollectionSkills().getExperience(identifier.substring(22).replace(" ", "-").replace("_", "-").toLowerCase()));
|
playerData.getCollectionSkills().getExperience(identifier.substring(22).replace(" ", "-").replace("_", "-").toLowerCase()));
|
||||||
|
Loading…
Reference in New Issue
Block a user