public void HandleNetworkMessages()
	{
		ArrayList<NetworkMessage> messages = mServer.GetMessages();
		
		for (int i = 0; i < messages.size(); i++)
		{
			try
			{
				StringTokenizer st = new StringTokenizer(messages.get(i).GetMessage());
				
				int id = Integer.parseInt(st.nextToken());
				
				if (id == 0)
				{
					continue;
				}
				
				Player p = GetPlayer(id);
				
				String command = st.nextToken();

				if (command.equals("keys"))
				{
					int w = Integer.parseInt(st.nextToken());
					int a = Integer.parseInt(st.nextToken());
					int s = Integer.parseInt(st.nextToken());
					int d = Integer.parseInt(st.nextToken());
					
					if (w == 1)
						p.GetInputHandler().KeyDown(Keyboard.KEY_W);
					else
						p.GetInputHandler().KeyUp(Keyboard.KEY_W);
					if (a == 1)
						p.GetInputHandler().KeyDown(Keyboard.KEY_A);
					else
						p.GetInputHandler().KeyUp(Keyboard.KEY_A);
					if (s == 1)
						p.GetInputHandler().KeyDown(Keyboard.KEY_S);
					else
						p.GetInputHandler().KeyUp(Keyboard.KEY_S);
					if (d == 1)
						p.GetInputHandler().KeyDown(Keyboard.KEY_D);
					else
						p.GetInputHandler().KeyUp(Keyboard.KEY_D);
				}
			}
			catch(Exception e)
			{
				System.out.println("Invalid Command");
			}
		}
	}