Guest User

Untitled

a guest
Jan 15th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. DataInputStream is = new DataInputStream(new ByteArrayInputStream(packet.data));
  2. String[] players = {};
  3. int[] kills = {};
  4. int[] deaths = {};
  5. int count;
  6. try {
  7. System.out.println("before count");
  8. count = is.readInt();
  9. System.out.println("count = "+ count);
  10. for (int i = 0; i < count; i++) {
  11. players[i] = is.readUTF();
  12. System.out.println(players[i]);
  13. }
  14. for (int i = 0; i < players.length; i++) {
  15. kills[i] = is.readInt();
  16. System.out.println(kills[i]);
  17. }
  18. for (int i = 0; i < players.length; i++) {
  19. deaths[i] = is.readInt();
  20. System.out.println(deaths[i]);
  21. }
  22. } catch (IOException e) {
  23. e.printStackTrace();
  24. }
  25.  
  26. for (int i = 0; i < players.length; i++) {
  27. ClientProxy.playerkills.put(players[i], kills[i]);
  28. ClientProxy.playerdeaths.put(players[i], deaths[i]);
  29. ClientProxy.players[i] = players[i];
  30. }
  31. }
Add Comment
Please, Sign In to add comment