Module gomint.api

Class PingEvent


  • public class PingEvent
    extends Event
    Version:
    1.0 This event gets fired when a unconnected Client pings the server. This can happen very often so care about putting heavy calculation on this event since it may slow down other connections by a huge amount.
    Author:
    geNAZt
    • Constructor Detail

      • PingEvent

        public PingEvent​(String motd,
                         int onlinePlayers,
                         int maxPlayers)
    • Method Detail

      • getMotd

        public String getMotd()
        Get the MOTD of this server
        Returns:
        MOTD of this server
      • setMotd

        public void setMotd​(String motd)
        Set a new MOTD for this ping
        Parameters:
        motd - to set
      • getOnlinePlayers

        public int getOnlinePlayers()
        Get the amount of users which should be shown
        Returns:
        amount of users
      • setOnlinePlayers

        public void setOnlinePlayers​(int onlinePlayers)
        Set the amount of users which should be shown
        Parameters:
        onlinePlayers - amount which should be shown
      • getMaxPlayers

        public int getMaxPlayers()
      • setMaxPlayers

        public void setMaxPlayers​(int maxPlayers)