forked from Upstream/mmocore
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_")) {
|
||||
int slot = Math.max(0, Integer.parseInt(identifier.substring(6)));
|
||||
return playerData.hasSkillBound(slot) ? playerData.getBoundSkill(slot).getSkill().getName()
|
||||
: MMOCore.plugin.configManager.noSkillBoundPlaceholder;
|
||||
|
||||
if (playerData.hasSkillBound(slot)) {
|
||||
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_"))
|
||||
return MythicLib.plugin.getMMOConfig().decimal.format(
|
||||
playerData.getCollectionSkills().getExperience(identifier.substring(22).replace(" ", "-").replace("_", "-").toLowerCase()));
|
||||
|
Loading…
Reference in New Issue
Block a user