Package dev.redcoke.mcserverping
Class MCServerPing
java.lang.Object
dev.redcoke.mcserverping.MCServerPing
API for pinging and obtaining info about a Minecraft server.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MCServerPingResponsePings a Minecraft Server to obtain server info.static MCServerPingResponsePings a Minecraft Server to obtain server info.static voidThrows IOException when condition is false.static intstatic voidwriteVarInt(DataOutputStream out, int inputParamInt)
-
Method Details
-
getPing
Pings a Minecraft Server to obtain server info.- Parameters:
address- server address- Returns:
- MCServerPingResponse
- Throws:
IOExceptionTimeoutException
-
getPing
public static MCServerPingResponse getPing(String address, int port) throws IOException, TimeoutException Pings a Minecraft Server to obtain server info.- Parameters:
address- server addressport- server port- Returns:
- MCServerPingResponse
- Throws:
IOExceptionTimeoutException
-
io
Throws IOException when condition is false.- Parameters:
b- Conditionm- Exception cause- Throws:
IOException- Exception
-
readVarInt
- Throws:
IOExceptionTimeoutException
-
writeVarInt
- Throws:
IOException
-