@Override
	public void onEnable()
	{
		p = this;
		
		// Register common listeners
		getServer().getPluginManager().registerEvents(new CommonMobListener(), this);
		
		/* #### CONFIG #### */
		getConfig();
		
		// Initialize configuration for components
		boolean somethingEnabled = false;
		for (int i = 0; i < Component.values().length; ++i)
		{
			if (Component.values()[i].i().initializeConfig())
			{
				somethingEnabled = true;
			}
		}
		
		// If no components are enabled there is nothing left to do.
		if (!somethingEnabled)
		{
			getLogger().warning("No components enabled :(");
			return;
		}
		
		// Check if Biome Specific Mobs are enabled
		biomeSpecificMobs = false;
		biomeSpecificMobs = getConfig().getBoolean("BiomeSpecificMobs", biomeSpecificMobs);
		//AbstractConfig.set(getConfig(), "BiomeSpecificMobs", biomeSpecificMobs);
		
		versionCheckEnabled = getConfig().getBoolean("EnableVersionCheck", true);
		AbstractConfig.set(getConfig(), "EnableVersionCheck", versionCheckEnabled);
		
		autoUpdateEnabled = getConfig().getBoolean("EnableAutoUpdater", false);
		AbstractConfig.set(getConfig(), "EnableAutoUpdater", autoUpdateEnabled);
		
		// Copy the Config header into config.yml
		AbstractConfig.copyHeader(getConfig(), "Config_Header.txt", "Global Config\n"
				+ "\nValid EntityTypes:\n" + ExtendedEntityType.getExtendedEntityList(false)
				+ "\n\nValid SubEntityTypes:\n" + ExtendedEntityType.getExtendedEntityList(true));
		
		integration.integrate();
		
		// Enable each component
		Component.enableComponents();
		
		getCommand("mm").setExecutor(new MMCommandListener());
		
		AbstractConfig.set(getConfig(), "Integration", getConfig().getConfigurationSection("Integration"));
		
		// Save the config with the current version
		AbstractConfig.set(getConfig(), "Version", getDescription().getVersion());
		saveConfig();
		
		// Check for updates
		if (versionCheckEnabled || autoUpdateEnabled)
		{
			Updater.UpdateType type;
			
			if (!autoUpdateEnabled)
			{
				type = Updater.UpdateType.NO_DOWNLOAD;
			}
			else
			{
				type = Updater.UpdateType.DEFAULT;
			}
			
			updater = new Updater(this, 48713, this.getFile(), type, true);
		}
		else
		{
			updater = null;
		}
		
		// Start Metrics gathering
		startMetrics();
	}