public void onEnable() {
		playerListener.loadPlayers();
		inventoryManager.load();
		
		pm = new PluginManager(this);
				
		pm.registerEvents(creatureListener);
		pm.registerEvents(entityListener);
		pm.registerEvents(playerListener);
		pm.registerEvents(pluginListener);
		pm.registerEvents(weatherListener);
		pm.registerEvents(worldListener);

		
		
		File serverconfigFile = new File("server.properties");
		if (!serverconfigFile.exists()) {
			log.severe(getNameBrackets() + "unable to load server.properties.");
		} else {
			try {
				serverconfig.load(new FileInputStream(serverconfigFile));
			} catch (Exception ex) {
				log.severe(getNameBrackets() + "error loading " + serverconfigFile);
				ex.printStackTrace();
			}
		}

		config = getConfig(getConfigFile("config.yml"));
		try {
			setConfigDefaults();
		} catch (IOException e) {
			e.printStackTrace();
		}
		worlds.load();
		gates.load();

		getServer().getScheduler().scheduleSyncRepeatingTask(this, new RunCreatureLimit(), 600, 600);
		getServer().getScheduler().scheduleSyncRepeatingTask(this, new RunTimeFrozen(), 200, 200);
		getServer().getScheduler().runTaskTimerAsynchronously(this, new Runnable() {
			public void run() {
				saveAll();
			}
		}, 12000, 12000);
		
		if (config.getBoolean("dynworld.enabled", false)) {
			getServer().getScheduler().scheduleSyncRepeatingTask(this, new RunCheckWorldInactive(), config.getInt("dynworld.checkInterval", 60) * 20, config.getInt("dynworld.checkInterval", 60) * 20);
		}
		
		getServer().getScheduler().scheduleSyncDelayedTask(this, new RunLoadAllWorlds());
		getServer().getScheduler().scheduleSyncDelayedTask(this, pm);
		
		try {
			getCommand("gate").setExecutor(new CommandHandlerGate(this));
			getCommand("gworld").setExecutor(new CommandHandlerWorld(this));
		} catch (Exception ex) {
			log.warning(getNameBrackets() + "getCommand().setExecutor() failed! Seems I got enabled by another plugin. Nag the bukkit team about this!");
		}
	}