Class ServerListPingEvent

All Implemented Interfaces:
Iterable<Player>

public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
Called when a server list ping is coming in. Displayed players can be checked and removed by iterating over this event.
Note: The players in iterator() will not be shown in the server info if Bukkit.getHideOnlinePlayers() is true.
  • Constructor Details

    • ServerListPingEvent

      public ServerListPingEvent(@NotNull InetAddress address, @NotNull String motd, int numPlayers, int maxPlayers)
    • ServerListPingEvent

      protected ServerListPingEvent(@NotNull InetAddress address, @NotNull String motd, int maxPlayers)
      This constructor is intended for implementations that provide the iterator() method, thus provided the getNumPlayers() count.
      Parameters:
      address - the address of the pinger
      motd - the message of the day
      maxPlayers - the max number of players
  • Method Details