Class ServerImpl

java.lang.Object
net.md_5.bungee.BungeeServerInfo
net.ME1312.SubServers.Sync.Server.ServerImpl
All Implemented Interfaces:
ServerInfo
Direct Known Subclasses:
SubServerImpl

public class ServerImpl extends BungeeServerInfo
Server Class
  • Field Details

    • whitelist

      public List<UUID> whitelist
  • Constructor Details

  • Method Details

    • construct

      public static ServerImpl construct(String signature, String name, String display, SocketAddress address, Map<Integer,UUID> subdata, String motd, boolean hidden, boolean restricted, Collection<UUID> whitelist)
    • getSubData

      public DataSender[] getSubData()
      Gets the SubData Client Channel IDs
      Returns:
      SubData Client Channel ID Array
    • setSubData

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

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

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

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

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

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

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

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

      public boolean canAccess(CommandSender player)
      See if a player is whitelisted
      Specified by:
      canAccess in interface ServerInfo
      Overrides:
      canAccess in class BungeeServerInfo
      Parameters:
      player - Player
      Returns:
      Whitelisted Status
    • whitelist

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

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

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