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 java.util.LinkedList<SubServer.LoggedCommand> |
getCommandHistory()
Gets all the commands that were sent to this SubServer successfully
|
abstract java.lang.String |
getDirectory()
Get the Server Directory
|
abstract Host |
getHost()
Grabs the Host of the Server
|
abstract SubLogger |
getLogger()
Get Process Logger
|
abstract java.lang.String |
getStopCommand()
Grab the Command to Stop the Server
|
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
|
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, getSubDataClient, hasExtra, isHidden, isRestricted, linkSubDataClient, removeExtra, setDisplayName, setHidden, setMotd, setRestricted
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 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 getDirectory()
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 abstract boolean isTemporary()
public abstract void setTemporary(boolean value)
value
- Value