mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-20 15:11:39 +01:00
make sure the Flags class is always loaded on startup
This commit is contained in:
parent
3bf18c41bb
commit
1c5ae9ef67
@ -22,6 +22,7 @@
|
||||
import com.sk89q.worldguard.bukkit.commands.CommandHandler;
|
||||
import com.sk89q.worldguard.protection.TimedFlagsTimer;
|
||||
import com.sk89q.worldguard.protection.regionmanager.GlobalRegionManager;
|
||||
import com.sk89q.worldguard.protection.regions.flags.Flags;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
@ -52,6 +53,8 @@ public class WorldGuardPlugin extends JavaPlugin {
|
||||
*/
|
||||
public void onEnable() {
|
||||
|
||||
Flags.Init();
|
||||
|
||||
getDataFolder().mkdirs();
|
||||
globalRegionManager.onEnable();
|
||||
|
||||
|
@ -74,4 +74,16 @@ public enum FlagType {
|
||||
// RegionGroup flags
|
||||
public static RegionGroupRegionFlagInfo TELE_PERM = new RegionGroupRegionFlagInfo("teleperm", FlagType.TELE_PERM);
|
||||
public static RegionGroupRegionFlagInfo SPAWN_PERM = new RegionGroupRegionFlagInfo("spawnperm", FlagType.SPAWN_PERM);
|
||||
|
||||
|
||||
private static Integer initCount = 0;
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
// this will init all static fields
|
||||
|
||||
// change some field's value to make sure this function
|
||||
// is not erased for optimization
|
||||
initCount++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user