Class ServerData
java.lang.Object
net.ME1312.SubServers.Velocity.Server.ServerData
- Direct Known Subclasses:
SubServerData
Server Class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionServerData
(String signature, String name, String display, InetSocketAddress address, Map<Integer, UUID> subdata, String motd, boolean hidden, boolean restricted, Collection<UUID> whitelist) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canAccess
(PermissionSubject player) See if a player is whitelistedget()
Get the underlying ServerInfo of this ServerGet the Address of this ServerGet the Display Name of this ServergetMotd()
Gets the MOTD of the ServergetName()
Get the Name of this Serverfinal String
Get the Signature of this ObjectGets the SubData Client Channel IDsboolean
isHidden()
If the server is hidden from playersboolean
Gets if the Server is Restrictedvoid
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)
-
Field Details
-
whitelist
-
-
Constructor Details
-
ServerData
public ServerData(String signature, String name, String display, InetSocketAddress address, Map<Integer, UUID> subdata, String motd, boolean hidden, boolean restricted, Collection<UUID> whitelist)
-
-
Method Details
-
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
-
get
Get the underlying ServerInfo of this Server- Returns:
- ServerInfo
-
getAddress
Get the Address of this Server- Returns:
- Server Address
-
getName
Get the Name of this Server- Returns:
- Server Name
-
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)
-
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
-
getMotd
Gets the MOTD of the Server- Returns:
- Server MOTD
-
setMotd
Sets the MOTD of the Server- Parameters:
value
- Value
-
isRestricted
public boolean isRestricted()Gets if the Server is Restricted- Returns:
- Restricted Status
-
setRestricted
public void setRestricted(boolean value) Sets if the Server is Restricted- Parameters:
value
- Value
-
canAccess
See if a player is whitelisted- 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
-