ChestShop-3/src/main/java/com/Acrobot/ChestShop/Plugins/WorldGuardFlags.java
2019-05-06 18:19:33 +01:00

22 lines
735 B
Java

package com.Acrobot.ChestShop.Plugins;
import com.sk89q.worldguard.WorldGuard;
import com.sk89q.worldguard.protection.flags.StateFlag;
import com.sk89q.worldguard.protection.flags.registry.FlagConflictException;
/**
* @author Brokkonaut
*/
public class WorldGuardFlags {
public static final StateFlag ENABLE_SHOP;
static {
StateFlag enableShop;
try {
enableShop = new StateFlag("allow-shop", false);
WorldGuard.getInstance().getFlagRegistry().register(enableShop);
} catch (FlagConflictException | IllegalStateException e) {
enableShop = (StateFlag) WorldGuard.getInstance().getFlagRegistry().get("allow-shop");
}
ENABLE_SHOP = enableShop;
}
}