Interface Server

All Superinterfaces:
ClientHandler, ExtraDataHandler<String>, ServerInfo, SubDataSerializable
All Known Subinterfaces:
SubServer
All Known Implementing Classes:
ExternalSubServer, InternalSubServer, ServerImpl, SubServerImpl

public interface Server extends ServerInfo, ClientHandler, ExtraDataHandler<String>
Server Interface
  • Method Details

    • setSubData

      void setSubData(DataClient client, int channel)
      Link a SubData Client to this Object
      Parameters:
      client - Client to Link
      channel - Channel ID
    • getDisplayName

      String getDisplayName()
      Get the Display Name of this Server
      Returns:
      Display Name
    • setDisplayName

      void setDisplayName(String value)
      Sets the Display Name for this Server
      Parameters:
      value - Value (or null to reset)
    • getGroups

      List<String> getGroups()
      Get this Server's Groups
      Returns:
      Group names
    • addGroup

      void addGroup(String value)
      Add this Server to a Group
      Parameters:
      value - Group name
    • removeGroup

      void removeGroup(String value)
      Remove this Server from a Group
      Parameters:
      value - value Group name
    • command

      boolean command(UUID player, UUID target, String command)
      Commands the Server
      Parameters:
      player - Player who's Commanding
      target - Player who will Send
      command - Command to Send
    • command

      default boolean command(UUID player, String command)
      Commands the Server
      Parameters:
      player - Player who's Commanding
      command - Command to Send
    • command

      default boolean command(String command)
      Commands the Server
      Parameters:
      command - Command to Send
    • getRemotePlayers

      Collection<RemotePlayer> getRemotePlayers()
      Get players on this server across all known proxies
      Returns:
      Remote Player Collection
    • isHidden

      boolean isHidden()
      If the server is hidden from players
      Returns:
      Hidden Status
    • setHidden

      void setHidden(boolean value)
      Set if the server is hidden from players
      Parameters:
      value - Value
    • getMotd

      String getMotd()
      Gets the MOTD of the Server
      Specified by:
      getMotd in interface ServerInfo
      Returns:
      Server MOTD
    • setMotd

      void setMotd(String value)
      Sets the MOTD of the Server
      Parameters:
      value - Value
    • isRestricted

      boolean isRestricted()
      Gets if the Server is Restricted
      Specified by:
      isRestricted in interface ServerInfo
      Returns:
      Restricted Status
    • setRestricted

      void setRestricted(boolean value)
      Sets if the Server is Restricted
      Parameters:
      value - Value
    • getWhitelist

      Collection<UUID> getWhitelist()
      Get a copy of the current whitelist
      Returns:
      Player Whitelist
    • isWhitelisted

      boolean isWhitelisted(UUID player)
      See if a player is whitelisted
      Parameters:
      player - Player to check
      Returns:
      Whitelisted Status
    • whitelist

      void whitelist(UUID player)
      Add a player to the whitelist (for use with restricted servers)
      Parameters:
      player - Player to add
    • unwhitelist

      void unwhitelist(UUID player)
      Remove a player to the whitelist
      Parameters:
      player - Player to remove
    • persist

      void persist()
      Makes it so the server object will still exist within the server manager even if it is disconnected
    • getSignature

      String getSignature()
      Get the Signature of this Object
      Returns:
      Object Signature