public class ExternalSubServer extends SubServer
SubServer.LoggedCommand
Constructor and Description |
---|
ExternalSubServer(ExternalHost host,
java.lang.String name,
boolean enabled,
int port,
java.lang.String motd,
boolean log,
java.lang.String directory,
Executable executable,
java.lang.String stopcmd,
boolean restart,
boolean hidden,
boolean restricted)
Creates an External SubServer
|
Modifier and Type | Method and Description |
---|---|
boolean |
command(java.util.UUID player,
java.lang.String command)
Commands the Server
|
int |
edit(java.util.UUID player,
YAMLSection edit)
Edits the Server
|
java.util.LinkedList<SubServer.LoggedCommand> |
getCommandHistory()
Gets all the commands that were sent to this SubServer successfully
|
Executable |
getExecutable()
Get the Server's Executable String
|
Host |
getHost()
Grabs the Host of the Server
|
SubLogger |
getLogger()
Get Process Logger
|
java.lang.String |
getPath()
Get the Server Directory Path
|
java.lang.String |
getStopCommand()
Grab the Command to Stop the Server
|
boolean |
isEnabled()
If the Server is Enabled
|
boolean |
isLogging()
If the Server is Logging
|
boolean |
isRunning()
If the Server is Running
|
boolean |
isTemporary()
If the Server is Temporary
|
void |
setAutoRestart(boolean value)
Set if the Server will Auto Restart on unexpected shutdowns
|
void |
setDisplayName(java.lang.String value)
Sets the Display Name for this Server
|
void |
setEnabled(boolean value)
Set if the Server is Enabled
|
void |
setLogging(boolean value)
Set if the Server is Logging
|
void |
setStopCommand(java.lang.String value)
Set the Command that Stops the Server
|
void |
setTemporary(boolean value)
Set If the Server is Temporary (will start server if not running)
|
boolean |
start(java.util.UUID player)
Starts the Server
|
boolean |
stop(java.util.UUID player)
Stops the Server
|
boolean |
terminate(java.util.UUID player)
Terminates the Server
|
void |
waitFor()
Waits for the Server to Stop
|
boolean |
willAutoRestart()
If the Server will Auto Restart on unexpected shutdowns
|
command, edit, getFullPath, start, stop, terminate
addExtra, getDisplayName, getExtra, getExtra, getMotd, getSubData, hasExtra, isHidden, isRestricted, removeExtra, setHidden, setMotd, setRestricted, setSubData
public ExternalSubServer(ExternalHost host, java.lang.String name, boolean enabled, int port, java.lang.String motd, boolean log, java.lang.String directory, Executable executable, java.lang.String stopcmd, boolean restart, boolean hidden, boolean restricted) throws InvalidServerException
host
- Hostname
- Nameenabled
- Enabled Statusport
- Port Numbermotd
- MOTDlog
- Logging Statusdirectory
- Directoryexecutable
- Executablestopcmd
- Stop Commandrestart
- Auto-Restarthidden
- Hidden Statusrestricted
- Restricted StatusInvalidServerException
public boolean start(java.util.UUID player)
SubServer
public boolean stop(java.util.UUID player)
SubServer
public boolean terminate(java.util.UUID player)
SubServer
public boolean command(java.util.UUID player, java.lang.String command)
SubServer
public int edit(java.util.UUID player, YAMLSection edit)
SubServer
public void waitFor() throws java.lang.InterruptedException
SubServer
public boolean isRunning()
SubServer
public void setDisplayName(java.lang.String value)
Server
setDisplayName
in class Server
value
- Value (or null to reset)public boolean isEnabled()
SubServer
public void setEnabled(boolean value)
SubServer
setEnabled
in class SubServer
value
- Valuepublic boolean isLogging()
SubServer
public void setLogging(boolean value)
SubServer
setLogging
in class SubServer
value
- Valuepublic java.util.LinkedList<SubServer.LoggedCommand> getCommandHistory()
SubServer
getCommandHistory
in class SubServer
public java.lang.String getPath()
SubServer
public Executable getExecutable()
SubServer
getExecutable
in class SubServer
public java.lang.String getStopCommand()
SubServer
getStopCommand
in class SubServer
public void setStopCommand(java.lang.String value)
SubServer
setStopCommand
in class SubServer
value
- Valuepublic boolean willAutoRestart()
SubServer
willAutoRestart
in class SubServer
public void setAutoRestart(boolean value)
SubServer
setAutoRestart
in class SubServer
value
- Valuepublic boolean isTemporary()
SubServer
isTemporary
in class SubServer
public void setTemporary(boolean value)
SubServer
setTemporary
in class SubServer
value
- Value