mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-09-29 23:18:02 +02:00
Also use registry to get the allow-shop flag
This commit is contained in:
parent
2e0c5a3cac
commit
619ac17cd5
@ -1,6 +1,5 @@
|
|||||||
package com.Acrobot.ChestShop.Plugins;
|
package com.Acrobot.ChestShop.Plugins;
|
||||||
import com.sk89q.worldguard.WorldGuard;
|
import com.sk89q.worldguard.WorldGuard;
|
||||||
import com.sk89q.worldguard.protection.flags.Flags;
|
|
||||||
import com.sk89q.worldguard.protection.flags.StateFlag;
|
import com.sk89q.worldguard.protection.flags.StateFlag;
|
||||||
import com.sk89q.worldguard.protection.flags.registry.FlagConflictException;
|
import com.sk89q.worldguard.protection.flags.registry.FlagConflictException;
|
||||||
|
|
||||||
@ -16,7 +15,7 @@ public class WorldGuardFlags {
|
|||||||
enableShop = new StateFlag("allow-shop", false);
|
enableShop = new StateFlag("allow-shop", false);
|
||||||
WorldGuard.getInstance().getFlagRegistry().register(enableShop);
|
WorldGuard.getInstance().getFlagRegistry().register(enableShop);
|
||||||
} catch (FlagConflictException | IllegalStateException e) {
|
} catch (FlagConflictException | IllegalStateException e) {
|
||||||
enableShop = (StateFlag) Flags.get("allow-shop");
|
enableShop = (StateFlag) WorldGuard.getInstance().getFlagRegistry().get("allow-shop");
|
||||||
}
|
}
|
||||||
ENABLE_SHOP = enableShop;
|
ENABLE_SHOP = enableShop;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user