Class ServerImpl
java.lang.Object
net.md_5.bungee.BungeeServerInfo
net.ME1312.SubServers.Sync.Server.ServerImpl
- All Implemented Interfaces:
ServerInfo
- Direct Known Subclasses:
SubServerImpl
Server Class
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
ServerImpl
(String signature, String name, String display, InetSocketAddress address, Map<Integer, UUID> subdata, String motd, boolean hidden, boolean restricted, Collection<UUID> whitelist) protected
ServerImpl
(String signature, String name, String display, SocketAddress address, Map<Integer, UUID> subdata, String motd, boolean hidden, boolean restricted, Collection<UUID> whitelist) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canAccess
(CommandSender player) See if a player is whitelistedstatic ServerImpl
construct
(String signature, String name, String display, SocketAddress address, Map<Integer, UUID> subdata, String motd, boolean hidden, boolean restricted, Collection<UUID> whitelist) Get the Display Name of this ServerGet players on this server across all known proxiesfinal String
Get the Signature of this ObjectGets the SubData Client Channel IDsboolean
isHidden()
If the server is hidden from playersvoid
setDisplayName
(String value) Sets the Display Name for this Servervoid
setHidden
(boolean value) Set if the server is hidden from playersvoid
Sets the MOTD of the Servervoid
setRestricted
(boolean value) Sets if the Server is Restrictedvoid
setSubData
(UUID client, int channel) Link a SubData Client to this Objectvoid
unwhitelist
(UUID player) Remove a player to the whitelistvoid
Add a player to the whitelist (for use with restricted servers)Methods inherited from class net.md_5.bungee.BungeeServerInfo
addPlayer, cachePing, equals, getAddress, getMotd, getName, getPacketQueue, getPermission, getPlayers, getSocketAddress, hashCode, isRestricted, ping, ping, removePlayer, sendData, sendData, toString
-
Field Details
-
whitelist
-
-
Constructor Details
-
ServerImpl
protected ServerImpl(String signature, String name, String display, SocketAddress address, Map<Integer, UUID> subdata, String motd, boolean hidden, boolean restricted, Collection<UUID> whitelist) -
ServerImpl
protected ServerImpl(String signature, String name, String display, InetSocketAddress address, Map<Integer, UUID> subdata, String motd, boolean hidden, boolean restricted, Collection<UUID> whitelist)
-
-
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
Gets the SubData Client Channel IDs- Returns:
- SubData Client Channel ID Array
-
setSubData
Link a SubData Client to this Object- Parameters:
client
- Client to Linkchannel
- Channel ID
-
getDisplayName
Get the Display Name of this Server- Returns:
- Display Name
-
setDisplayName
Sets the Display Name for this Server- Parameters:
value
- Value (or null to reset)
-
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
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
See if a player is whitelisted- Specified by:
canAccess
in interfaceServerInfo
- Overrides:
canAccess
in classBungeeServerInfo
- Parameters:
player
- Player- Returns:
- Whitelisted Status
-
whitelist
Add a player to the whitelist (for use with restricted servers)- Parameters:
player
- Player to add
-
unwhitelist
Remove a player to the whitelist- Parameters:
player
- Player to remove
-
getSignature
Get the Signature of this Object- Returns:
- Object Signature
-