From cbb726e02054ea64de7064c56a699a357b82e931 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 22 Jan 2019 16:54:43 -0800 Subject: [PATCH] attempt to register flags if they are still not registered --- src/main/java/com/gmail/nossr50/WorldGuardManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/WorldGuardManager.java b/src/main/java/com/gmail/nossr50/WorldGuardManager.java index a27332544..27c0c98b2 100644 --- a/src/main/java/com/gmail/nossr50/WorldGuardManager.java +++ b/src/main/java/com/gmail/nossr50/WorldGuardManager.java @@ -37,6 +37,10 @@ public class WorldGuardManager { public boolean hasMainFlag(Player player) { + //Not sure when we're supposed to know when WorldGuard is loaded + if(!flagsRegistered) + registerFlags(); + BukkitPlayer localPlayer = BukkitAdapter.adapt(player); com.sk89q.worldedit.util.Location loc = localPlayer.getLocation(); @@ -60,6 +64,10 @@ public class WorldGuardManager { public boolean hasXPFlag(Player player) { + //Not sure when we're supposed to know when WorldGuard is loaded + if(!flagsRegistered) + registerFlags(); + BukkitPlayer localPlayer = BukkitAdapter.adapt(player); com.sk89q.worldedit.util.Location loc = localPlayer.getLocation();