Class ServerImpl
java.lang.Object
net.md_5.bungee.BungeeServerInfo
net.ME1312.SubServers.Bungee.Host.ServerImpl
- All Implemented Interfaces:
ServerInfo
,ExtraDataHandler<String>
,ClientHandler
,SubDataSerializable
,Server
- Direct Known Subclasses:
SubServerImpl
Server Class
-
Constructor Summary
ModifierConstructorDescriptionprotected
ServerImpl
(String name, InetSocketAddress address, String motd, boolean hidden, boolean restricted) Super Method 1 (oldest)protected
ServerImpl
(String name, SocketAddress address, String motd, boolean hidden, boolean restricted) Super Method 2 (newest) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Add this Server to a Groupboolean
canAccess
(CommandSender player) See if a player can access this serverboolean
Commands the Serverstatic ServerImpl
construct
(String name, SocketAddress address, String motd, boolean hidden, boolean restricted) Construct a new Server data typeboolean
Get the Display Name of this ServergetExtra()
Get this Server's GroupsGet players on this server across all known proxiesfinal String
Get the Signature of this ObjectGet a copy of the current whitelistboolean
boolean
isHidden()
If the server is hidden from playersprotected boolean
Get if this server has been registeredboolean
isWhitelisted
(UUID player) See if a player is whitelistedfinal void
persist()
Makes it so the server object will still exist within the server manager even if it is disconnectedvoid
removeExtra
(String handle) void
removeGroup
(String value) Remove this Server from a Groupvoid
removeSubData
(DataClient client) void
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
(DataClient 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, getAddress, getMotd, getName, getPacketQueue, getPermission, getPlayers, getSocketAddress, hashCode, isRestricted, ping, ping, removePlayer, sendData, sendData, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.ME1312.SubServers.Bungee.Host.Server
command, command, getMotd, isRestricted
Methods inherited from interface net.md_5.bungee.api.config.ServerInfo
getAddress, getName, getPermission, getPlayers, getSocketAddress, ping, sendData, sendData
-
Constructor Details
-
ServerImpl
protected ServerImpl(String name, SocketAddress address, String motd, boolean hidden, boolean restricted) throws InvalidServerException Super Method 2 (newest)- Throws:
InvalidServerException
- See Also:
-
ServerImpl
protected ServerImpl(String name, InetSocketAddress address, String motd, boolean hidden, boolean restricted) throws InvalidServerException Super Method 1 (oldest)- Throws:
InvalidServerException
- See Also:
-
-
Method Details
-
construct
public static ServerImpl construct(String name, SocketAddress address, String motd, boolean hidden, boolean restricted) throws InvalidServerException Construct a new Server data type- Parameters:
name
- Server nameaddress
- Server Addressmotd
- Server MOTDhidden
- Hidden Statusrestricted
- Restricted Status- Returns:
- Throws:
InvalidServerException
-
isRegistered
protected boolean isRegistered()Get if this server has been registered- Returns:
- Registered status
-
getSubData
- Specified by:
getSubData
in interfaceClientHandler
-
setSubData
Description copied from interface:Server
Link a SubData Client to this Object- Specified by:
setSubData
in interfaceServer
- Parameters:
client
- Client to Linkchannel
- Channel ID
-
removeSubData
- Specified by:
removeSubData
in interfaceClientHandler
-
getDisplayName
Description copied from interface:Server
Get the Display Name of this Server- Specified by:
getDisplayName
in interfaceServer
- Returns:
- Display Name
-
setDisplayName
Description copied from interface:Server
Sets the Display Name for this Server- Specified by:
setDisplayName
in interfaceServer
- Parameters:
value
- Value (or null to reset)
-
getGroups
Description copied from interface:Server
Get this Server's Groups -
addGroup
Description copied from interface:Server
Add this Server to a Group -
removeGroup
Description copied from interface:Server
Remove this Server from a Group- Specified by:
removeGroup
in interfaceServer
- Parameters:
value
- value Group name
-
command
Description copied from interface:Server
Commands the Server -
getRemotePlayers
Description copied from interface:Server
Get players on this server across all known proxies- Specified by:
getRemotePlayers
in interfaceServer
- Returns:
- Remote Player Collection
-
isHidden
public boolean isHidden()Description copied from interface:Server
If the server is hidden from players -
setHidden
public void setHidden(boolean value) Description copied from interface:Server
Set if the server is hidden from players -
setMotd
Description copied from interface:Server
Sets the MOTD of the Server -
setRestricted
public void setRestricted(boolean value) Description copied from interface:Server
Sets if the Server is Restricted- Specified by:
setRestricted
in interfaceServer
- Parameters:
value
- Value
-
canAccess
See if a player can access this server- Specified by:
canAccess
in interfaceServerInfo
- Overrides:
canAccess
in classBungeeServerInfo
- Parameters:
player
- Player- Returns:
- Whitelisted Status
-
getWhitelist
Description copied from interface:Server
Get a copy of the current whitelist- Specified by:
getWhitelist
in interfaceServer
- Returns:
- Player Whitelist
-
isWhitelisted
Description copied from interface:Server
See if a player is whitelisted- Specified by:
isWhitelisted
in interfaceServer
- Parameters:
player
- Player to check- Returns:
- Whitelisted Status
-
whitelist
Description copied from interface:Server
Add a player to the whitelist (for use with restricted servers) -
unwhitelist
Description copied from interface:Server
Remove a player to the whitelist- Specified by:
unwhitelist
in interfaceServer
- Parameters:
player
- Player to remove
-
persist
public final void persist()Description copied from interface:Server
Makes it so the server object will still exist within the server manager even if it is disconnected -
getSignature
Description copied from interface:Server
Get the Signature of this Object- Specified by:
getSignature
in interfaceServer
- Returns:
- Object Signature
-
equals
- Overrides:
equals
in classBungeeServerInfo
-
addExtra
- Specified by:
addExtra
in interfaceExtraDataHandler<String>
-
hasExtra
- Specified by:
hasExtra
in interfaceExtraDataHandler<String>
-
getExtra
- Specified by:
getExtra
in interfaceExtraDataHandler<String>
-
getExtra
- Specified by:
getExtra
in interfaceExtraDataHandler<String>
-
removeExtra
- Specified by:
removeExtra
in interfaceExtraDataHandler<String>
-
forSubData
- Specified by:
forSubData
in interfaceClientHandler
- Specified by:
forSubData
in interfaceSubDataSerializable
-