Expand server ping method.

This commit is contained in:
md_5 2013-01-12 11:18:35 +11:00
parent 4f0a02dcca
commit 14e196e952
2 changed files with 19 additions and 3 deletions

View File

@ -24,9 +24,7 @@ public abstract class Server implements Connection
/** /**
* Asynchronously gets the current player count on this server. * Asynchronously gets the current player count on this server.
* *
* TODO: Return all info available via the standard query protocol
*
* @param callback the callback to call when the count has been retrieved. * @param callback the callback to call when the count has been retrieved.
*/ */
public abstract void getPlayerCount(Callback<Integer> callback); public abstract void getPlayerCount(Callback<ServerPing> callback);
} }

View File

@ -0,0 +1,18 @@
package net.md_5.bungee.api;
import lombok.Data;
/**
* Represents the standard list data returned by opening a server in the
* Minecraft client server list, or hitting it with a packet 0xFE.
*/
@Data
public class ServerPing
{
private final byte protocolVersion;
private final String gameVersion;
private final String motd;
private final String currentPlayers;
private final String maxPlayers;
}