Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class ServerPlayerCount {
- public int ServerPlayerCount(String server) {
- ByteArrayOutputStream b = new ByteArrayOutputStream();
- DataOutputStream out = new DataOutputStream(b);
- ByteArrayInputStream i = new ByteArrayInputStream(b.toByteArray());
- DataInputStream in = new DataInputStream(i);
- try {
- out.writeUTF("PlayerCount");
- out.writeUTF(server);
- int playercount = in.readInt();
- return playercount;
- } catch (IOException e) { e.printStackTrace(); return -1; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement