Implement server ping method.
This commit is contained in:
@@ -25,9 +25,9 @@ public class ServerPing
|
||||
/**
|
||||
* Current amount of players on the server.
|
||||
*/
|
||||
private final String currentPlayers;
|
||||
private final int currentPlayers;
|
||||
/**
|
||||
* Max amount of players the server will allow.
|
||||
*/
|
||||
private final String maxPlayers;
|
||||
private final int maxPlayers;
|
||||
}
|
||||
|
@@ -1,30 +1,27 @@
|
||||
package net.md_5.bungee.api.event;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import net.md_5.bungee.api.ServerPing;
|
||||
import net.md_5.bungee.api.config.ListenerInfo;
|
||||
import net.md_5.bungee.api.connection.PendingConnection;
|
||||
import net.md_5.bungee.api.plugin.Event;
|
||||
|
||||
/**
|
||||
* Called when the proxy is pinged with packet 0xFE from the server list.
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ProxyPingEvent extends Event
|
||||
{
|
||||
|
||||
/**
|
||||
* The address of the user pinging.
|
||||
* The connection asking for a ping response.
|
||||
*/
|
||||
private final InetSocketAddress remoteAddress;
|
||||
/**
|
||||
* The data corresponding to the server which received this ping.
|
||||
*/
|
||||
private final ListenerInfo server;
|
||||
private final PendingConnection connection;
|
||||
/**
|
||||
* The data to respond with.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user