re-added Init() functions to flags class, do not remove it, or the flags class will NOT be loaded on startup which will cause unexpected behaviour

This commit is contained in:
Redecouverte 2011-03-09 13:30:07 +01:00
parent 7fab4144ae
commit 9c91f06c5d
2 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,7 @@
import com.sk89q.worldguard.bukkit.commands.CommandHandler.InsufficientPermissionsException;
import com.sk89q.worldguard.protection.TimedFlagsTimer;
import com.sk89q.worldguard.protection.regionmanager.GlobalRegionManager;
import com.sk89q.worldguard.protection.regions.flags.Flags;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@ -52,6 +53,7 @@ public class WorldGuardPlugin extends JavaPlugin {
*/
public void onEnable() {
getDataFolder().mkdirs();
Flags.Init();
globalRegionManager.onEnable();
// Register events

View File

@ -75,4 +75,10 @@ public enum FlagType {
public static RegionGroupRegionFlagInfo TELE_PERM = new RegionGroupRegionFlagInfo("teleperm", FlagType.TELE_PERM);
public static RegionGroupRegionFlagInfo SPAWN_PERM = new RegionGroupRegionFlagInfo("spawnperm", FlagType.SPAWN_PERM);
private static int initCount = 0;
static public void Init() {
initCount++;
}
}