fix null flag state check

This commit is contained in:
jascotty2 2019-09-19 11:14:31 -05:00
parent c0a56b3fe1
commit a71331faaa

View File

@ -216,7 +216,8 @@ public class StackingTask extends BukkitRunnable {
if (isStack) return;
// Check our WorldGuard flag.
if (WorldGuardHook.isEnabled() && !WorldGuardHook.getBooleanFlag(livingEntity.getLocation(), "mob-stacking"))
Boolean flag = WorldGuardHook.isEnabled() ? WorldGuardHook.getBooleanFlag(livingEntity.getLocation(), "mob-stacking") : null;
if (flag != null && !flag)
return;
// Remove all stacked entities from our stackable friends.