From f82dce04644414d33e6bd6c28dbe25edb50b5535 Mon Sep 17 00:00:00 2001 From: Benford Date: Wed, 16 Mar 2016 22:12:09 -0400 Subject: [PATCH] Fix passives in disabled world --- src/com/projectkorra/projectkorra/BendingPlayer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/projectkorra/projectkorra/BendingPlayer.java b/src/com/projectkorra/projectkorra/BendingPlayer.java index ecb39b80..186a486c 100644 --- a/src/com/projectkorra/projectkorra/BendingPlayer.java +++ b/src/com/projectkorra/projectkorra/BendingPlayer.java @@ -219,6 +219,8 @@ public class BendingPlayer { } public boolean canBendPassive(Element element) { + List 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; }