mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
attempt to register flags if they are still not registered
This commit is contained in:
parent
0ad1530505
commit
cbb726e020
@ -37,6 +37,10 @@ public class WorldGuardManager {
|
|||||||
|
|
||||||
public boolean hasMainFlag(Player player)
|
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);
|
BukkitPlayer localPlayer = BukkitAdapter.adapt(player);
|
||||||
com.sk89q.worldedit.util.Location loc = localPlayer.getLocation();
|
com.sk89q.worldedit.util.Location loc = localPlayer.getLocation();
|
||||||
|
|
||||||
@ -60,6 +64,10 @@ public class WorldGuardManager {
|
|||||||
|
|
||||||
public boolean hasXPFlag(Player player)
|
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);
|
BukkitPlayer localPlayer = BukkitAdapter.adapt(player);
|
||||||
com.sk89q.worldedit.util.Location loc = localPlayer.getLocation();
|
com.sk89q.worldedit.util.Location loc = localPlayer.getLocation();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user