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
ConstructorsModifierConstructorDescriptionprotectedServerImpl(String name, InetSocketAddress address, String motd, boolean hidden, boolean restricted) Super Method 1 (oldest)protectedServerImpl(String name, SocketAddress address, String motd, boolean hidden, boolean restricted) Super Method 2 (newest) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAdd this Server to a GroupbooleancanAccess(CommandSender player) See if a player can access this serverbooleanCommands the Serverstatic ServerImplconstruct(String name, SocketAddress address, String motd, boolean hidden, boolean restricted) Construct a new Server data typebooleanGet the Display Name of this ServergetExtra()Get this Server's GroupsGet players on this server across all known proxiesfinal StringGet the Signature of this ObjectGet a copy of the current whitelistbooleanbooleanisHidden()If the server is hidden from playersprotected booleanGet if this server has been registeredbooleanisWhitelisted(UUID player) See if a player is whitelistedfinal voidpersist()Makes it so the server object will still exist within the server manager even if it is disconnectedvoidremoveExtra(String handle) voidremoveGroup(String value) Remove this Server from a GroupvoidremoveSubData(DataClient client) voidsetDisplayName(String value) Sets the Display Name for this ServervoidsetHidden(boolean value) Set if the server is hidden from playersvoidSets the MOTD of the ServervoidsetRestricted(boolean value) Sets if the Server is RestrictedvoidsetSubData(DataClient client, int channel) Link a SubData Client to this Objectvoidunwhitelist(UUID player) Remove a player to the whitelistvoidAdd 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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.ME1312.SubServers.Bungee.Host.Server
command, command, getMotd, isRestrictedMethods 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:
getSubDatain interfaceClientHandler
-
setSubData
Description copied from interface:ServerLink a SubData Client to this Object- Specified by:
setSubDatain interfaceServer- Parameters:
client- Client to Linkchannel- Channel ID
-
removeSubData
- Specified by:
removeSubDatain interfaceClientHandler
-
getDisplayName
Description copied from interface:ServerGet the Display Name of this Server- Specified by:
getDisplayNamein interfaceServer- Returns:
- Display Name
-
setDisplayName
Description copied from interface:ServerSets the Display Name for this Server- Specified by:
setDisplayNamein interfaceServer- Parameters:
value- Value (or null to reset)
-
getGroups
Description copied from interface:ServerGet this Server's Groups -
addGroup
Description copied from interface:ServerAdd this Server to a Group -
removeGroup
Description copied from interface:ServerRemove this Server from a Group- Specified by:
removeGroupin interfaceServer- Parameters:
value- value Group name
-
command
Description copied from interface:ServerCommands the Server -
getRemotePlayers
Description copied from interface:ServerGet players on this server across all known proxies- Specified by:
getRemotePlayersin interfaceServer- Returns:
- Remote Player Collection
-
isHidden
public boolean isHidden()Description copied from interface:ServerIf the server is hidden from players -
setHidden
public void setHidden(boolean value) Description copied from interface:ServerSet if the server is hidden from players -
setMotd
Description copied from interface:ServerSets the MOTD of the Server -
setRestricted
public void setRestricted(boolean value) Description copied from interface:ServerSets if the Server is Restricted- Specified by:
setRestrictedin interfaceServer- Parameters:
value- Value
-
canAccess
See if a player can access this server- Specified by:
canAccessin interfaceServerInfo- Overrides:
canAccessin classBungeeServerInfo- Parameters:
player- Player- Returns:
- Whitelisted Status
-
getWhitelist
Description copied from interface:ServerGet a copy of the current whitelist- Specified by:
getWhitelistin interfaceServer- Returns:
- Player Whitelist
-
isWhitelisted
Description copied from interface:ServerSee if a player is whitelisted- Specified by:
isWhitelistedin interfaceServer- Parameters:
player- Player to check- Returns:
- Whitelisted Status
-
whitelist
Description copied from interface:ServerAdd a player to the whitelist (for use with restricted servers) -
unwhitelist
Description copied from interface:ServerRemove a player to the whitelist- Specified by:
unwhitelistin interfaceServer- Parameters:
player- Player to remove
-
persist
public final void persist()Description copied from interface:ServerMakes it so the server object will still exist within the server manager even if it is disconnected -
getSignature
Description copied from interface:ServerGet the Signature of this Object- Specified by:
getSignaturein interfaceServer- Returns:
- Object Signature
-
equals
- Overrides:
equalsin classBungeeServerInfo
-
addExtra
- Specified by:
addExtrain interfaceExtraDataHandler<String>
-
hasExtra
- Specified by:
hasExtrain interfaceExtraDataHandler<String>
-
getExtra
- Specified by:
getExtrain interfaceExtraDataHandler<String>
-
getExtra
- Specified by:
getExtrain interfaceExtraDataHandler<String>
-
removeExtra
- Specified by:
removeExtrain interfaceExtraDataHandler<String>
-
forSubData
- Specified by:
forSubDatain interfaceClientHandler- Specified by:
forSubDatain interfaceSubDataSerializable
-