mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Merge pull request #450 from Simplicitee/master
Fix passives in disabled world
This commit is contained in:
commit
d32b701f82
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue