// Path: Journey of Legends/aginsun/journey/client/guis/GuiStats.java
// public class GuiStats extends GuiScreen
// {
// 	private StatKeeper stats;
// 	private EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;
// 	private LevelKeeper level;
// 	
// 	public void initGui()
// 	{
//         buttonList.clear();
// 
// 		if(level.getSP(player) > 0)
// 		{
// 			buttonList.add(new GuiButton(1, width / 2 - 20, 15, 120, 20, "Upgrade Strength"));
// 			buttonList.add(new GuiButton(2, width / 2 - 20, 75, 120, 20, "Upgrade Dexerity"));
// 			buttonList.add(new GuiButton(3, width / 2 - 20, 135, 120, 20, "Upgrade Intelligence"));
// 			buttonList.add(new GuiButton(4, width / 2 - 20, 195, 120, 20, "Upgrade Luck"));
// 		}
// 	}
// 	
// 	public void actionPerformed(GuiButton guibutton)
// 	{
// 		if(guibutton.id == 1)
// 		{
// 			PacketDispatcher.sendPacketToServer(PacketType.populatePacket(new PacketStatChange(player.username, "STR", 1)));
// 			initGui();
// 		}
// 		if(guibutton.id == 2)
// 		{
// 			PacketDispatcher.sendPacketToServer(PacketType.populatePacket(new PacketStatChange(player.username, "DEX", 1)));
// 			initGui();
// 		}
// 		if(guibutton.id == 3)
// 		{
// 			PacketDispatcher.sendPacketToServer(PacketType.populatePacket(new PacketStatChange(player.username, "INT", 1)));
// 			initGui();
// 		}
// 		if(guibutton.id == 4)
// 		{
// 			PacketDispatcher.sendPacketToServer(PacketType.populatePacket(new PacketStatChange(player.username, "LUK", 1)));
// 			initGui();
// 		}
// 	}
// 	
//     public boolean doesGuiPauseGame()
//     {
//         return false;
//     }
//     
//     public void onGuiClosed() 
//     {
//     	if(QuestHandler.instance().getQuestStatusClient(player, "The beginning of a great adventure") == 1)
//     		PacketDispatcher.sendPacketToServer(PacketType.populatePacket(new PacketQuestData(player.username, "The beginning of a great adventure", 2)));
//     }
// 
//     
//     public void drawScreen(int i, int j, float f)
// 	{
//     	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
//     	char c = '\377';
//     	char c1 = '\377';
//         ResourceLocation resource = new ResourceLocation("journeyoflegends", "textures/guis/crafting.png");
//         mc.renderEngine.func_110577_a(resource);
//     	int i1 = (width - c) / 2;
//     	drawTexturedModalRect(i1, 0, 0, 0, c, c1);
//     	drawString(fontRenderer, new StringBuilder("Strength: ").append(stats.getStrengthPoints(player)).toString(), width / 2 - 100, 20, 0xffcc00);
//     	drawString(fontRenderer, new StringBuilder("Dexerity: ").append(stats.getDexerityPoints(player)).toString(), width / 2 - 100, 80, 0xffcc00);
//     	drawString(fontRenderer, new StringBuilder("Intelligence: ").append(stats.getIntelligencePoints(player)).toString(), width / 2 - 100, 140, 0xffcc00);
//     	drawString(fontRenderer, new StringBuilder("Luck: ").append(stats.getLuckPoints(player)).toString(), width / 2 - 100, 200, 0xffcc00);
//         for (int m = 0; m < buttonList.size(); m++)
//         {
//             GuiButton guibutton = (GuiButton)buttonList.get(m);
//             guibutton.drawButton(mc, i, j);
//         }
//         super.drawScreen(i, j, f);
// 	}
// }


import java.util.EnumSet;
import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Keyboard;
import aginsun.journey.client.guis.GuiStats;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.TickType;
package aginsun.journey.client.handlers;





public class KeyBindingHandler extends KeyHandler
{
	public static KeyBinding StatsScreen = new KeyBinding("Tale of Kingdoms 2 StatScreen", Keyboard.KEY_O);

	public static KeyBinding[] arrayOfKeys = new KeyBinding[] {StatsScreen};
	public static boolean[] areRepeating = new boolean[] {false};

	public KeyBindingHandler() 
	{
	  super(arrayOfKeys, areRepeating);
	}
	
	@Override
	public String getLabel() 
	{
	  return "Tale of Kingdoms 2 Keybindings";
	}
	
	@Override
	public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) 
	{
		if (FMLClientHandler.instance().getClient().currentScreen == null) 
		{
			if(kb.keyCode == StatsScreen.keyCode) 
			{
// Path: Journey of Legends/aginsun/journey/client/guis/GuiStats.java
// public class GuiStats extends GuiScreen
// {
// 	private StatKeeper stats;
// 	private EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;
// 	private LevelKeeper level;
// 	
// 	public void initGui()
// 	{
//         buttonList.clear();
// 
// 		if(level.getSP(player) > 0)
// 		{
// 			buttonList.add(new GuiButton(1, width / 2 - 20, 15, 120, 20, "Upgrade Strength"));
// 			buttonList.add(new GuiButton(2, width / 2 - 20, 75, 120, 20, "Upgrade Dexerity"));
// 			buttonList.add(new GuiButton(3, width / 2 - 20, 135, 120, 20, "Upgrade Intelligence"));
// 			buttonList.add(new GuiButton(4, width / 2 - 20, 195, 120, 20, "Upgrade Luck"));
// 		}
// 	}
// 	
// 	public void actionPerformed(GuiButton guibutton)
// 	{
// 		if(guibutton.id == 1)
// 		{
// 			PacketDispatcher.sendPacketToServer(PacketType.populatePacket(new PacketStatChange(player.username, "STR", 1)));
// 			initGui();
// 		}
// 		if(guibutton.id == 2)
// 		{
// 			PacketDispatcher.sendPacketToServer(PacketType.populatePacket(new PacketStatChange(player.username, "DEX", 1)));
// 			initGui();
// 		}
// 		if(guibutton.id == 3)
// 		{
// 			PacketDispatcher.sendPacketToServer(PacketType.populatePacket(new PacketStatChange(player.username, "INT", 1)));
// 			initGui();
// 		}
// 		if(guibutton.id == 4)
// 		{
// 			PacketDispatcher.sendPacketToServer(PacketType.populatePacket(new PacketStatChange(player.username, "LUK", 1)));
// 			initGui();
// 		}
// 	}
// 	
//     public boolean doesGuiPauseGame()
//     {
//         return false;
//     }
//     
//     public void onGuiClosed() 
//     {
//     	if(QuestHandler.instance().getQuestStatusClient(player, "The beginning of a great adventure") == 1)
//     		PacketDispatcher.sendPacketToServer(PacketType.populatePacket(new PacketQuestData(player.username, "The beginning of a great adventure", 2)));
//     }
// 
//     
//     public void drawScreen(int i, int j, float f)
// 	{
//     	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
//     	char c = '\377';
//     	char c1 = '\377';
//         ResourceLocation resource = new ResourceLocation("journeyoflegends", "textures/guis/crafting.png");
//         mc.renderEngine.func_110577_a(resource);
//     	int i1 = (width - c) / 2;
//     	drawTexturedModalRect(i1, 0, 0, 0, c, c1);
//     	drawString(fontRenderer, new StringBuilder("Strength: ").append(stats.getStrengthPoints(player)).toString(), width / 2 - 100, 20, 0xffcc00);
//     	drawString(fontRenderer, new StringBuilder("Dexerity: ").append(stats.getDexerityPoints(player)).toString(), width / 2 - 100, 80, 0xffcc00);
//     	drawString(fontRenderer, new StringBuilder("Intelligence: ").append(stats.getIntelligencePoints(player)).toString(), width / 2 - 100, 140, 0xffcc00);
//     	drawString(fontRenderer, new StringBuilder("Luck: ").append(stats.getLuckPoints(player)).toString(), width / 2 - 100, 200, 0xffcc00);
//         for (int m = 0; m < buttonList.size(); m++)
//         {
//             GuiButton guibutton = (GuiButton)buttonList.get(m);
//             guibutton.drawButton(mc, i, j);
//         }
//         super.drawScreen(i, j, f);
// 	}
// }


// Path: Journey of Legends/aginsun/journey/client/handlers/KeyBindingHandler.java
import java.util.EnumSet;
import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Keyboard;
import aginsun.journey.client.guis.GuiStats;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.TickType;

package aginsun.journey.client.handlers;





public class KeyBindingHandler extends KeyHandler
{
	public static KeyBinding StatsScreen = new KeyBinding("Tale of Kingdoms 2 StatScreen", Keyboard.KEY_O);

	public static KeyBinding[] arrayOfKeys = new KeyBinding[] {StatsScreen};
	public static boolean[] areRepeating = new boolean[] {false};

	public KeyBindingHandler() 
	{
	  super(arrayOfKeys, areRepeating);
	}
	
	@Override
	public String getLabel() 
	{
	  return "Tale of Kingdoms 2 Keybindings";
	}
	
	@Override
	public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) 
	{
		if (FMLClientHandler.instance().getClient().currentScreen == null) 
		{
			if(kb.keyCode == StatsScreen.keyCode) 
			{
				FMLCommonHandler.instance().showGuiScreen(new GuiStats());