public abstract class SubServer extends Server
Modifier and Type | Class and Description |
---|---|
static class |
SubServer.LoggedCommand
Command Storage Class
|
Constructor and Description |
---|
SubServer(Host host,
java.lang.String name,
int port,
java.lang.String motd,
boolean hidden,
boolean restricted)
Creates a SubServer
|
Modifier and Type | Method and Description |
---|---|
boolean |
command(java.lang.String command)
Commands the Server
|
abstract boolean |
command(java.util.UUID player,
java.lang.String command)
Commands the Server
|
abstract int |
edit(java.util.UUID player,
YAMLSection edit)
Edits the Server
|
int |
edit(YAMLSection edit)
Edits the Server
|
abstract java.util.LinkedList<SubServer.LoggedCommand> |
getCommandHistory()
Gets all the commands that were sent to this Server successfully
|
java.util.List<SubServer> |
getCurrentIncompatibilities()
Get incompatibility issues this server currently has
|
abstract Executable |
getExecutable()
Get the Server's Executable String
|
java.lang.String |
getFullPath()
Get the Full Server Directory Path
|
abstract Host |
getHost()
Grabs the Host of the Server
|
java.util.List<SubServer> |
getIncompatibilities()
Get all listed incompatibilities for this Server
|
abstract SubLogger |
getLogger()
Get Process Logger
|
abstract java.lang.String |
getPath()
Get the Server Directory Path
|
abstract java.lang.String |
getStopCommand()
Grab the Command to Stop the Server
|
boolean |
isCompatible(SubServer server)
Checks if a Server is compatible
|
abstract boolean |
isEnabled()
If the Server is Enabled
|
abstract boolean |
isLogging()
If the Server is Logging
|
abstract boolean |
isRunning()
If the Server is Running
|
abstract boolean |
isTemporary()
If the Server is Temporary
|
abstract void |
setAutoRestart(boolean value)
Set if the Server will Auto Restart on unexpected shutdowns
|
abstract void |
setEnabled(boolean value)
Set if the Server is Enabled
|
abstract void |
setLogging(boolean value)
Set if the Server is Logging
|
abstract void |
setStopCommand(java.lang.String value)
Set the Command that Stops the Server
|
abstract void |
setTemporary(boolean value)
Set If the Server is Temporary (will start server if not running)
|
boolean |
start()
Starts the Server
|
abstract boolean |
start(java.util.UUID player)
Starts the Server
|
boolean |
stop()
Stops the Server
|
abstract boolean |
stop(java.util.UUID player)
Stops the Server
|
boolean |
terminate()
Terminates the Server
|
abstract boolean |
terminate(java.util.UUID player)
Terminates the Server
|
void |
toggleCompatibility(SubServer... server)
Toggles compatibility with other Servers
|
java.lang.String |
toString() |
abstract void |
waitFor()
Waits for the Server to Stop
|
abstract boolean |
willAutoRestart()
If the Server will Auto Restart on unexpected shutdowns
|
addExtra, getDisplayName, getExtra, getExtra, getMotd, getSubData, hasExtra, isHidden, isRestricted, removeExtra, setDisplayName, setHidden, setMotd, setRestricted, setSubData
public SubServer(Host host, java.lang.String name, int port, java.lang.String motd, boolean hidden, boolean restricted) throws InvalidServerException
host
- Hostname
- Server Nameport
- Port Numbermotd
- Server MOTDrestricted
- Players will need a permission to join if trueInvalidServerException
public abstract boolean start(java.util.UUID player)
player
- Player who Startedpublic boolean start()
public abstract boolean stop(java.util.UUID player)
player
- Player who Stoppedpublic boolean stop()
public abstract boolean terminate(java.util.UUID player)
player
- Player who Terminatedpublic boolean terminate()
public abstract boolean command(java.util.UUID player, java.lang.String command)
player
- Player who Commandedcommand
- Command to Sendpublic boolean command(java.lang.String command)
command
- Command to Sendpublic abstract int edit(java.util.UUID player, YAMLSection edit)
player
- Player Editingedit
- Editspublic int edit(YAMLSection edit)
edit
- Editspublic abstract void waitFor() throws java.lang.InterruptedException
java.lang.InterruptedException
public abstract boolean isRunning()
public abstract Host getHost()
public abstract boolean isEnabled()
public abstract void setEnabled(boolean value)
value
- Valuepublic abstract boolean isLogging()
public abstract void setLogging(boolean value)
value
- Valuepublic abstract SubLogger getLogger()
public abstract java.util.LinkedList<SubServer.LoggedCommand> getCommandHistory()
public abstract java.lang.String getPath()
public java.lang.String getFullPath()
public abstract Executable getExecutable()
public abstract java.lang.String getStopCommand()
public abstract void setStopCommand(java.lang.String value)
value
- Valuepublic abstract boolean willAutoRestart()
public abstract void setAutoRestart(boolean value)
value
- Valuepublic void toggleCompatibility(SubServer... server)
server
- SubServers to togglepublic boolean isCompatible(SubServer server)
server
- Server to checkpublic java.util.List<SubServer> getIncompatibilities()
public java.util.List<SubServer> getCurrentIncompatibilities()
public abstract boolean isTemporary()
public abstract void setTemporary(boolean value)
value
- Value