mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Adds canBind check to canBend (#533)
canBend now accounts for permissions and elements
This commit is contained in:
parent
bb383e584a
commit
a554c748d6
1 changed files with 2 additions and 0 deletions
|
@ -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())) {
|
||||||
|
|
Loading…
Reference in a new issue