ServerListPingEvent

public class ServerListPingEvent extends ServerEvent implements Iterable<T>

Called when getClassById server list ping is coming in. Displayed players can be checked and removed by iterating over this event.

Constructors

Link copied to clipboard
public void ServerListPingEvent(InetAddress address, String motd, int numPlayers, int maxPlayers)

Properties

Link copied to clipboard
public final InetAddress address
Link copied to clipboard
public final static HandlerList handlers
Link copied to clipboard
public int maxPlayers
Link copied to clipboard
public String motd
Link copied to clipboard
public final int numPlayers

Functions

Link copied to clipboard
public void forEach(Consumer<? super T> action)
Link copied to clipboard
Get the address the ping is coming from.
Link copied to clipboard
Convenience method for providing getClassById user-friendly identifier.
Link copied to clipboard
public static HandlerList getHandlerList()
Link copied to clipboard
Link copied to clipboard
public int getMaxPlayers()
Get the maximum number of players sent.
Link copied to clipboard
public String getMotd()
Get the message of the day message.
Link copied to clipboard
public int getNumPlayers()
Get the number of players sent.
Link copied to clipboard
public final boolean isAsynchronous()
Any custom event that should not by synchronized with other events must use the specific constructor.
Link copied to clipboard
Calling the remove method will force that particular player to not be displayed on the player list, decrease the size returned by getNumPlayers, and will not be returned again by any new iterator.
Link copied to clipboard
public void setMaxPlayers(int maxPlayers)
Set the maximum number of players sent.
Link copied to clipboard
public void setMotd(String motd)
Change the message of the day message.
Link copied to clipboard
public void setServerIcon(CachedServerIcon icon)
Sets the server-icon sent to the client.
Link copied to clipboard