mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-11 04:39:32 +00:00
Fix passives in disabled world
This commit is contained in:
parent
e2bd9a874a
commit
f82dce0464
|
@ -219,6 +219,8 @@ public class BendingPlayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canBendPassive(Element element) {
|
public boolean canBendPassive(Element element) {
|
||||||
|
List<String> disabledWorlds = getConfig().getStringList("Properties.DisabledWorlds");
|
||||||
|
|
||||||
if (element == null || player == null) {
|
if (element == null || player == null) {
|
||||||
return false;
|
return false;
|
||||||
} else if (!player.hasPermission("bending." + element.getName() + ".passive")) {
|
} else if (!player.hasPermission("bending." + element.getName() + ".passive")) {
|
||||||
|
@ -227,6 +229,8 @@ public class BendingPlayer {
|
||||||
return false;
|
return false;
|
||||||
} else if (isChiBlocked() || isParalyzed() || isBloodbent()) {
|
} else if (isChiBlocked() || isParalyzed() || isBloodbent()) {
|
||||||
return false;
|
return false;
|
||||||
|
} else if (disabledWorlds != null && disabledWorlds.contains(player.getWorld().getName())) {
|
||||||
|
return false;
|
||||||
} else if (GeneralMethods.isRegionProtectedFromBuild(player, player.getLocation())) {
|
} else if (GeneralMethods.isRegionProtectedFromBuild(player, player.getLocation())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue