Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DataInputStream is = new DataInputStream(new ByteArrayInputStream(packet.data));
- String[] players = {};
- int[] kills = {};
- int[] deaths = {};
- int count;
- try {
- System.out.println("before count");
- count = is.readInt();
- System.out.println("count = "+ count);
- for (int i = 0; i < count; i++) {
- players[i] = is.readUTF();
- System.out.println(players[i]);
- }
- for (int i = 0; i < players.length; i++) {
- kills[i] = is.readInt();
- System.out.println(kills[i]);
- }
- for (int i = 0; i < players.length; i++) {
- deaths[i] = is.readInt();
- System.out.println(deaths[i]);
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- for (int i = 0; i < players.length; i++) {
- ClientProxy.playerkills.put(players[i], kills[i]);
- ClientProxy.playerdeaths.put(players[i], deaths[i]);
- ClientProxy.players[i] = players[i];
- }
- }
Add Comment
Please, Sign In to add comment