__global__ region can be null

This commit is contained in:
isokissa3 2018-04-21 01:44:02 +03:00
parent 112fc75d2f
commit 63c2c351ea

View file

@ -67,9 +67,12 @@ public class WorldGuardUtils
NormativeOrders.sort(checkForRegions);
ProtectedRegion global = WorldGuardExtraFlagsPlugin.getWorldGuardPlugin().getRegionManager(world).getRegion(ProtectedRegion.GLOBAL_REGION);
if (WorldGuardUtils.hasBypass(player, world, global, flag)) //Lets do like this for now to reduce dublicated code
if (global != null) //Global region can be null
{
global = null;
if (WorldGuardUtils.hasBypass(player, world, global, flag)) //Lets do like this for now to reduce dublicated code
{
global = null;
}
}
return new FlagValueCalculator(checkForRegions, global);