Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
Improved Server List Ping
Browse files Browse the repository at this point in the history
  • Loading branch information
Defective4 committed Feb 22, 2023
1 parent 88e2e43 commit 21c41fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
AMCC Change Log
v1.10.0

[+] Fixed:
- Server List Ping is now improved

[+] Added:
- New preferences file format
- "About" information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public static StatusInfo serverListPing(final String host, final int port, final
final OutputStream os = soc.getOutputStream();
final VarInputStream is = new VarInputStream(soc.getInputStream());

final Packet handshake = new HandshakePacket(PacketFactory.constructPacketRegistry(47), -1, host, port, 1);
final Packet handshake = new HandshakePacket(PacketFactory.constructPacketRegistry(47),
ProtocolNumber.values()[0].protocol, host, port, 1);
os.write(handshake.getData(false));
os.write(0x01);
os.write(0x00);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public void run() {
try {
info = MinecraftStat.serverListPing(host, port);
} catch (final Exception e) {
e.printStackTrace();
info = MinecraftStat.legacyServerListPing(host, port);
}
}
Expand Down

0 comments on commit 21c41fd

Please sign in to comment.