public class Server extends net.md_5.bungee.BungeeServerInfo implements ClientHandler, ExtraDataHandler
Constructor and Description |
---|
Server(java.lang.String name,
java.net.InetSocketAddress address,
java.lang.String motd,
boolean hidden,
boolean restricted) |
Modifier and Type | Method and Description |
---|---|
void |
addExtra(java.lang.String handle,
java.lang.Object value)
Add an extra value to this Server
|
java.lang.String |
getDisplayName()
Get the Display Name of this Server
|
YAMLSection |
getExtra()
Get the extra value section
|
YAMLValue |
getExtra(java.lang.String handle)
Get an extra value
|
java.lang.String |
getMotd()
Gets the MOTD of the Server
|
Client |
getSubDataClient()
Gets the SubData Client
|
boolean |
hasExtra(java.lang.String handle)
Determine if an extra value exists
|
boolean |
isHidden()
If the server is hidden from players
|
boolean |
isRestricted()
Gets if the Server is Restricted
|
void |
linkSubDataClient(Client client)
Link a SubData Client to this Object
|
void |
removeExtra(java.lang.String handle)
Remove an extra value from this Server
|
void |
setDisplayName(java.lang.String value)
Sets the Display Name for this Server
|
void |
setHidden(boolean value)
Set if the server is hidden from players
|
void |
setMotd(java.lang.String value)
Sets the MOTD of the Server
|
void |
setRestricted(boolean value)
Sets if the Server is Restricted
|
public Server(java.lang.String name, java.net.InetSocketAddress address, java.lang.String motd, boolean hidden, boolean restricted) throws InvalidServerException
InvalidServerException
public Client getSubDataClient()
ClientHandler
getSubDataClient
in interface ClientHandler
public void linkSubDataClient(Client client)
ClientHandler
linkSubDataClient
in interface ClientHandler
client
- Client to Linkpublic java.lang.String getDisplayName()
public void setDisplayName(java.lang.String value)
value
- Value (or null to reset)public boolean isHidden()
public void setHidden(boolean value)
value
- Valuepublic java.lang.String getMotd()
getMotd
in interface net.md_5.bungee.api.config.ServerInfo
getMotd
in class net.md_5.bungee.BungeeServerInfo
public void setMotd(java.lang.String value)
value
- Valuepublic boolean isRestricted()
isRestricted
in class net.md_5.bungee.BungeeServerInfo
public void setRestricted(boolean value)
value
- Valuepublic void addExtra(java.lang.String handle, java.lang.Object value)
ExtraDataHandler
addExtra
in interface ExtraDataHandler
handle
- Handlevalue
- Valuepublic boolean hasExtra(java.lang.String handle)
ExtraDataHandler
hasExtra
in interface ExtraDataHandler
handle
- Handlepublic YAMLValue getExtra(java.lang.String handle)
ExtraDataHandler
getExtra
in interface ExtraDataHandler
handle
- Handlepublic YAMLSection getExtra()
ExtraDataHandler
getExtra
in interface ExtraDataHandler
public void removeExtra(java.lang.String handle)
ExtraDataHandler
removeExtra
in interface ExtraDataHandler
handle
- Handle