Adds canBind check to canBend (#533)

canBend now accounts for permissions and elements
This commit is contained in:
OmniCypher 2016-08-10 12:05:04 -07:00 committed by GitHub
parent bb383e584a
commit a554c748d6

View file

@ -180,6 +180,8 @@ public class BendingPlayer {
if (!player.isOnline() || player.isDead()) { if (!player.isOnline() || player.isDead()) {
return false; return false;
} else if (!canBind(ability)) {
return false;
} else if (ability.getPlayer() != null && ability.getLocation() != null && !ability.getLocation().getWorld().equals(player.getWorld())) { } else if (ability.getPlayer() != null && ability.getLocation() != null && !ability.getLocation().getWorld().equals(player.getWorld())) {
return false; return false;
} else if (!ignoreCooldowns && isOnCooldown(ability.getName())) { } else if (!ignoreCooldowns && isOnCooldown(ability.getName())) {