public abstract class SubServerController
extends java.lang.Object
Constructor and Description |
---|
SubServerController(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
|
SubServer |
get()
Get the SubServer that is being controlled
|
abstract java.util.LinkedList<SubServer.LoggedCommand> |
getCommandHistory()
Gets all the commands that were sent to this Server successfully
|
abstract Executable |
getExecutable()
Get the Server's Executable String
|
abstract Host |
getHost()
Grabs the Host of the 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
|
abstract boolean |
isEditable()
If the Server is accepting requests to edit()
|
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 |
setEditable(boolean value)
Set if the Server should accept requests to edit()
|
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
|
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
|
public SubServerController(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 SubServer get()
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 isEditable()
edit(YAMLSection)
,
edit(UUID, YAMLSection)
public abstract void setEditable(boolean value)
value
- Edit Statusedit(YAMLSection)
,
edit(UUID, YAMLSection)
public 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 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 abstract boolean isTemporary()
public abstract void setTemporary(boolean value)
value
- Valuepublic java.lang.String toString()
toString
in class java.lang.Object