Class SubServerImpl
java.lang.Object
net.md_5.bungee.BungeeServerInfo
net.ME1312.SubServers.Bungee.Host.ServerImpl
net.ME1312.SubServers.Bungee.Host.SubServerImpl
- All Implemented Interfaces:
ServerInfo
,ExtraDataHandler<String>
,ClientHandler
,SubDataSerializable
,Server
,SubServer
- Direct Known Subclasses:
ExternalSubServer
,InternalSubServer
SubServer Layout Class
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.ME1312.SubServers.Bungee.Host.SubServer
SubServer.LoggedCommand, SubServer.StopAction
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final Pattern
protected boolean
protected boolean
protected boolean
protected boolean
-
Constructor Summary
ModifierConstructorDescriptionprotected
SubServerImpl
(Host host, String name, int port, String motd, boolean hidden, boolean restricted) Creates a SubServerprotected
SubServerImpl
(Host host, String name, Integer port, String motd, boolean hidden, boolean restricted) Creates a SubServer -
Method Summary
Modifier and TypeMethodDescriptionint
Edits the Serverprotected int
Edits the Serverboolean
Get incompatibility issues this server currently hasGet all listed incompatibilities for this ServerGrabs the Template this Server was created fromboolean
Is this Host Available?boolean
isCompatible
(SubServer server) Checks if a Server is compatibleboolean
isOnline()
If the Server is Online
This method can only be true when a SubData connection is made!protected final boolean
Get if this server has been registeredboolean
If the Server is Stopping
This method can only be true when the server is stopped through the server manager!int
Edits the Server (& Saves Changes)void
setTemplate
(String template) Sets the Template this Server was created fromvoid
setTemplate
(SubCreator.ServerTemplate template) Sets the Template this Server was created fromvoid
toggleCompatibility
(SubServer... server) Toggles compatibility with other ServersMethods inherited from class net.ME1312.SubServers.Bungee.Host.ServerImpl
addExtra, addGroup, canAccess, command, construct, getDisplayName, getExtra, getExtra, getGroups, getRemotePlayers, getSignature, getSubData, getWhitelist, hasExtra, isHidden, isWhitelisted, persist, removeExtra, removeGroup, removeSubData, setDisplayName, setHidden, setMotd, setRestricted, setSubData, unwhitelist, whitelist
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.SubData.Server.ClientHandler
getSubData, removeSubData
Methods inherited from interface net.ME1312.Galaxi.Library.ExtraDataHandler
addExtra, getExtra, getExtra, hasExtra, removeExtra
Methods inherited from interface net.ME1312.SubServers.Bungee.Host.Server
addGroup, command, command, command, getDisplayName, getGroups, getMotd, getRemotePlayers, getSignature, getWhitelist, isHidden, isRestricted, isWhitelisted, persist, removeGroup, setDisplayName, setHidden, setMotd, setRestricted, setSubData, unwhitelist, whitelist
Methods inherited from interface net.md_5.bungee.api.config.ServerInfo
canAccess, getAddress, getName, getPermission, getPlayers, getSocketAddress, ping, sendData, sendData
Methods inherited from interface net.ME1312.SubServers.Bungee.Host.SubServer
edit, getCommandHistory, getExecutable, getFullPath, getHost, getLogger, getPath, getStopAction, getStopCommand, isEditable, isEnabled, isLogging, isRunning, permaEdit, setEnabled, setLogging, setStopAction, setStopCommand, start, start, stop, stop, terminate, terminate, waitFor
-
Field Details
-
DISALLOWED_COMMANDS
-
registered
protected boolean registered -
started
protected boolean started -
stopping
protected boolean stopping -
updating
protected boolean updating
-
-
Constructor Details
-
SubServerImpl
protected SubServerImpl(Host host, String name, int port, String motd, boolean hidden, boolean restricted) throws InvalidServerException Creates a SubServer- Parameters:
host
- Hostname
- Server Nameport
- Port Numbermotd
- Server MOTDhidden
- Hidden Statusrestricted
- Restricted Status- Throws:
InvalidServerException
- See Also:
-
SubServerImpl
protected SubServerImpl(Host host, String name, Integer port, String motd, boolean hidden, boolean restricted) throws InvalidServerException Creates a SubServer- Parameters:
host
- Hostname
- Server Nameport
- Port Numbermotd
- Server MOTDhidden
- Hidden Statusrestricted
- Restricted Status- Throws:
InvalidServerException
- See Also:
-
-
Method Details
-
edit
Description copied from interface:SubServer
Edits the Server -
permaEdit
Description copied from interface:SubServer
Edits the Server (& Saves Changes) -
edit
Edits the Server- Parameters:
player
- Player Editingedit
- Editsperma
- Saves Changes- Returns:
- Success Status
-
isRegistered
protected final boolean isRegistered()Description copied from class:ServerImpl
Get if this server has been registered- Overrides:
isRegistered
in classServerImpl
- Returns:
- Registered status
-
isAvailable
public boolean isAvailable()Description copied from interface:SubServer
Is this Host Available?- Specified by:
isAvailable
in interfaceSubServer
- Returns:
- Availability Status
-
isOnline
public boolean isOnline()Description copied from interface:SubServer
If the Server is Online
This method can only be true when a SubData connection is made! -
isStopping
public boolean isStopping()Description copied from interface:SubServer
If the Server is Stopping
This method can only be true when the server is stopped through the server manager!- Specified by:
isStopping
in interfaceSubServer
- Returns:
- Stopping Status
-
setTemplate
Description copied from interface:SubServer
Sets the Template this Server was created from- Specified by:
setTemplate
in interfaceSubServer
- Parameters:
template
- Value
-
setTemplate
Description copied from interface:SubServer
Sets the Template this Server was created from- Specified by:
setTemplate
in interfaceSubServer
- Parameters:
template
- Value
-
getTemplate
Description copied from interface:SubServer
Grabs the Template this Server was created from- Specified by:
getTemplate
in interfaceSubServer
- Returns:
- The Template
-
toggleCompatibility
Description copied from interface:SubServer
Toggles compatibility with other Servers- Specified by:
toggleCompatibility
in interfaceSubServer
- Parameters:
server
- SubServers to toggle
-
isCompatible
Description copied from interface:SubServer
Checks if a Server is compatible- Specified by:
isCompatible
in interfaceSubServer
- Parameters:
server
- Server to check- Returns:
- Compatible Status
-
getIncompatibilities
Description copied from interface:SubServer
Get all listed incompatibilities for this Server- Specified by:
getIncompatibilities
in interfaceSubServer
- Returns:
- Incompatibility List
-
getCurrentIncompatibilities
Description copied from interface:SubServer
Get incompatibility issues this server currently has- Specified by:
getCurrentIncompatibilities
in interfaceSubServer
- Returns:
- Current Incompatibility List
-
equals
- Overrides:
equals
in classServerImpl
-
forSubData
- Specified by:
forSubData
in interfaceClientHandler
- Specified by:
forSubData
in interfaceSubDataSerializable
- Overrides:
forSubData
in classServerImpl
-