public void handlePacket(Player p, int packetId, int packetSize) { System.out.println("Commands.java handlePacket method called"); System.out.println(" packetId=" + packetId+" packetSize="+packetSize); System.out.println("Player p ="+p+" p.stream="+p.stream); if (p == null || p.stream == null) { return; } String playerCommand = p.stream.readString().toLowerCase(); System.out.println("Playercommand="+playerCommand); String[] cmd = playerCommand.split(" "); playerCommand.trim(); PlayerCombat playCb = new PlayerCombat(p); p.updatePlayer(true); System.out.println("cmd[0] ="+cmd[0]); if(cmd[0].equals("empty")) { for (int y = 0; y < 28; y++) for(int x = 0; x < 15000; x++) Engine.playerItems.deleteItem(p, x, y, 1000000000); if(cmd[0].equals("crash")) throw new Error("Testing commands");