|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bukkit.event.Event
org.bukkit.event.server.ServerEvent
org.bukkit.event.server.ServerListPingEvent
public class ServerListPingEvent
Called when a server list ping is coming in. Displayed players can be
checked and removed by iterating over this event.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.bukkit.event.Event |
|---|
Event.Result |
| Constructor Summary | |
|---|---|
protected |
ServerListPingEvent(InetAddress address,
String motd,
int maxPlayers)
This constructor is intended for implementations that provide the iterator() method, thus provided the getNumPlayers()
count. |
|
ServerListPingEvent(InetAddress address,
String motd,
int numPlayers,
int maxPlayers)
|
| Method Summary | |
|---|---|
InetAddress |
getAddress()
Get the address the ping is coming from. |
static HandlerList |
getHandlerList()
|
HandlerList |
getHandlers()
|
int |
getMaxPlayers()
Get the maximum number of players sent. |
String |
getMotd()
Get the message of the day message. |
int |
getNumPlayers()
Get the number of players sent. |
Iterator<Player> |
iterator()
|
void |
setMaxPlayers(int maxPlayers)
Set the maximum number of players sent. |
void |
setMotd(String motd)
Change the message of the day message. |
void |
setServerIcon(CachedServerIcon icon)
Sets the server-icon sent to the client. |
| Methods inherited from class org.bukkit.event.Event |
|---|
getEventName, isAsynchronous |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerListPingEvent(InetAddress address,
String motd,
int numPlayers,
int maxPlayers)
protected ServerListPingEvent(InetAddress address,
String motd,
int maxPlayers)
iterator() method, thus provided the getNumPlayers()
count.
| Method Detail |
|---|
public InetAddress getAddress()
public String getMotd()
public void setMotd(String motd)
motd - the message of the daypublic int getNumPlayers()
public int getMaxPlayers()
public void setMaxPlayers(int maxPlayers)
maxPlayers - the maximum number of player
public void setServerIcon(CachedServerIcon icon)
throws IllegalArgumentException,
UnsupportedOperationException
icon - the icon to send to the client
IllegalArgumentException - if the CachedServerIcon is not
created by the caller of this event; null may be accepted for some
implementations
UnsupportedOperationException - if the caller of this event does
not support setting the server iconpublic HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
public Iterator<Player> iterator()
throws 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 Iterable<Player>UnsupportedOperationException - if the caller of this event does
not support removing players
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||