mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 10:07:38 +01:00
Expand server ping method.
This commit is contained in:
parent
4f0a02dcca
commit
14e196e952
@ -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);
|
||||||
}
|
}
|
||||||
|
18
api/src/main/java/net/md_5/bungee/api/ServerPing.java
Normal file
18
api/src/main/java/net/md_5/bungee/api/ServerPing.java
Normal 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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user