mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2024-12-28 10:04:50 +00:00
__global__ region can be null
This commit is contained in:
parent
112fc75d2f
commit
63c2c351ea
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue