package com.github.lunatrius.ingameinfo;

import com.github.lunatrius.core.version.VersionChecker;
import com.github.lunatrius.ingameinfo.handler.ConfigurationHandler;
import com.github.lunatrius.ingameinfo.lib.Reference;
import com.github.lunatrius.ingameinfo.proxy.CommonProxy;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.event.FMLServerStoppingEvent;

@Mod(modid = Reference.MODID, name = Reference.NAME, guiFactory = Reference.GUI_FACTORY)
public class InGameInfoXML {
	@Instance(Reference.MODID)
	public static InGameInfoXML instance;

	@SidedProxy(serverSide = Reference.PROXY_COMMON, clientSide = Reference.PROXY_CLIENT)
	public static CommonProxy proxy;

	@EventHandler
	public void preInit(FMLPreInitializationEvent event) {
		VersionChecker.registerMod(event.getModMetadata(), Reference.FORGE);

		Reference.logger = event.getModLog();

		ConfigurationHandler.init(event.getSuggestedConfigurationFile());

		proxy.setupConfig(event.getModConfigurationDirectory());
	}

	@EventHandler
	public void init(FMLInitializationEvent event) {
		proxy.registerEvents();
		proxy.registerCommands();
	}

	@EventHandler
	public void serverStarting(FMLServerStartingEvent event) {
		proxy.setServer(event.getServer());
	}

	@EventHandler
	public void serverStopping(FMLServerStoppingEvent event) {
		proxy.setServer(null);
	}
}

@@ -1045,80 +1045,8 @@
 ) %7B%0A
-%09%09VersionChecker.registerMod(event.getModMetadata(), Reference.FORGE);%0A%0A
 %09%09Re
@@ -1081,17 +1081,16 @@
 dLog();%0A
-%0A
 %09%09Config
@@ -1149,17 +1149,16 @@
 ile());%0A
-%0A
 %09%09proxy.
@@ -1203,24 +1203,96 @@
 irectory());
+%0A%0A%09%09VersionChecker.registerMod(event.getModMetadata(), Reference.FORGE);
 %0A%09%7D%0A%0A%09@Event

Move the version checker registration to the end of preInit, make sure the logger is initialized first.