java.lang.Iterable<Player>PaperServerListPingEventpublic class ServerListPingEvent extends ServerEvent implements java.lang.Iterable<Player>
iterating over this event.Event.Result| Modifier | Constructor | Description | 
|---|---|---|
| protected  | ServerListPingEvent(java.net.InetAddress address,
                   java.lang.String motd,
                   int maxPlayers) | This constructor is intended for implementations that provide the
  iterator()method, thus provided thegetNumPlayers()count. | 
|   | ServerListPingEvent(java.net.InetAddress address,
                   java.lang.String motd,
                   int numPlayers,
                   int maxPlayers) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| java.net.InetAddress | getAddress() | Get the address the ping is coming from. | 
| static HandlerList | getHandlerList() | |
| HandlerList | getHandlers() | |
| int | getMaxPlayers() | Get the maximum number of players sent. | 
| java.lang.String | getMotd() | Get the message of the day message. | 
| int | getNumPlayers() | Get the number of players sent. | 
| java.util.Iterator<Player> | iterator() | |
| void | setMaxPlayers(int maxPlayers) | Set the maximum number of players sent. | 
| void | setMotd(java.lang.String motd) | Change the message of the day message. | 
| void | setServerIcon(CachedServerIcon icon) | Sets the server-icon sent to the client. | 
callEvent, getEventName, isAsynchronouspublic ServerListPingEvent(java.net.InetAddress address,
                           java.lang.String motd,
                           int numPlayers,
                           int maxPlayers)
protected ServerListPingEvent(java.net.InetAddress address,
                              java.lang.String motd,
                              int maxPlayers)
iterator() method, thus provided the getNumPlayers()
 count.address - the address of the pingermotd - the message of the daymaxPlayers - the max number of playerspublic java.net.InetAddress getAddress()
public java.lang.String getMotd()
public void setMotd(java.lang.String motd)
motd - the message of the daypublic int getNumPlayers()
public int getMaxPlayers()
public void setMaxPlayers(int maxPlayers)
maxPlayers - the maximum number of playerpublic void setServerIcon(CachedServerIcon icon) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
icon - the icon to send to the clientjava.lang.IllegalArgumentException - if the CachedServerIcon is not
     created by the caller of this event; null may be accepted for some
     implementationsjava.lang.UnsupportedOperationException - if the caller of this event does
     not support setting the server iconpublic HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
public java.util.Iterator<Player> iterator() throws java.lang.UnsupportedOperationException
 Calling the Iterator.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.
iterator in interface java.lang.Iterable<Player>java.lang.UnsupportedOperationException - if the caller of this event does
     not support removing playersCopyright © 2018. All rights reserved.