package ncrashed.registration;

import java.io.File;

import net.minecraft.command.ICommandManager;
import net.minecraft.command.ServerCommandManager;

import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;

public class CommonProxy 
{
	protected static int ITERATION_COUNT = 1042;
    protected static String CONFIG_NAME = "registration.cfg";
    
    public void initConfig(File configDir)
    {
    	NetworkRegistry.instance().registerConnectionHandler(new ConnectionTracker());
    	GameRegistry.registerPlayerTracker(new PlayerTracker());
    }
    
    public void initLoginInformation()
    {
    	
    }
    
    public void initCommands()
    {
    	if(FMLCommonHandler.instance().getEffectiveSide().equals(Side.SERVER))
    	{
    		ICommandManager mng = FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager();
    		ServerCommandManager smng = (ServerCommandManager)mng;
    		smng.registerCommand(new CommandShowInventory());
    		smng.registerCommand(new CommandClearInventory());
    		System.out.println("Special commands registered");
    	}
    }
    
    public String getLogin()
    {
    	return ""; 
    }
    
    public String getPassHash()
    {
    	return "";
    }
}
