Merge pull request #450 from Simplicitee/master

Fix passives in disabled world
This commit is contained in:
OmniCypher 2016-03-16 19:26:36 -07:00
commit d32b701f82

View file

@ -219,6 +219,8 @@ public class BendingPlayer {
}
public boolean canBendPassive(Element element) {
List<String> disabledWorlds = getConfig().getStringList("Properties.DisabledWorlds");
if (element == null || player == null) {
return false;
} else if (!player.hasPermission("bending." + element.getName() + ".passive")) {
@ -227,6 +229,8 @@ public class BendingPlayer {
return false;
} else if (isChiBlocked() || isParalyzed() || isBloodbent()) {
return false;
} else if (disabledWorlds != null && disabledWorlds.contains(player.getWorld().getName())) {
return false;
} else if (GeneralMethods.isRegionProtectedFromBuild(player, player.getLocation())) {
return false;
}