mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-10-31 15:49:37 +01: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;
|
||||
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.registry.FlagConflictException;
|
||||
|
||||
@ -16,7 +15,7 @@ public class WorldGuardFlags {
|
||||
enableShop = new StateFlag("allow-shop", false);
|
||||
WorldGuard.getInstance().getFlagRegistry().register(enableShop);
|
||||
} catch (FlagConflictException | IllegalStateException e) {
|
||||
enableShop = (StateFlag) Flags.get("allow-shop");
|
||||
enableShop = (StateFlag) WorldGuard.getInstance().getFlagRegistry().get("allow-shop");
|
||||
}
|
||||
ENABLE_SHOP = enableShop;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user