public class SubServer extends Server
Constructor and Description |
---|
SubServer(YAMLSection raw)
Create an API representation of a Server
|
Modifier and Type | Method and Description |
---|---|
void |
command(java.lang.String command)
Commands the Server
|
void |
command(java.lang.String command,
Callback<java.lang.Integer> response)
Commands the Server
|
void |
command(java.util.UUID player,
java.lang.String command)
Commands the Server
|
void |
command(java.util.UUID player,
java.lang.String command,
Callback<java.lang.Integer> response)
Commands the Server
|
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.String> |
getCurrentIncompatibilities()
Get incompatibility issues this server currently has
|
java.lang.String |
getExecutable()
Get the Server's Executable String
|
void |
getHost(Callback<Host> callback)
Grabs the Host of the Server
|
java.util.List<java.lang.String> |
getIncompatibilities()
Get all listed incompatibilities for this Server
|
java.lang.String |
getPath()
Get the Server Directory Path
|
java.lang.String |
getStopCommand()
Grab the Command to Stop the Server
|
boolean |
isCompatible(java.lang.String server)
Checks if a Server is compatible
|
boolean |
isEditable()
If the Server is accepting requests to edit()
|
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 |
refresh()
Download a new copy of the data from SubData
|
void |
start()
Starts the Server
|
void |
start(Callback<java.lang.Integer> response)
Starts the Server
|
void |
start(java.util.UUID player)
Starts the Server
|
void |
start(java.util.UUID player,
Callback<java.lang.Integer> response)
Starts the Server
|
void |
stop()
Stops the Server
|
void |
stop(Callback<java.lang.Integer> response)
Stops the Server
|
void |
stop(java.util.UUID player)
Stops the Server
|
void |
stop(java.util.UUID player,
Callback<java.lang.Integer> response)
Stops the Server
|
void |
terminate()
Terminates the Server
|
void |
terminate(Callback<java.lang.Integer> response)
Terminates the Server
|
void |
terminate(java.util.UUID player)
Terminates the Server
|
void |
terminate(java.util.UUID player,
Callback<java.lang.Integer> response)
Terminates the Server
|
boolean |
willAutoRestart()
If the Server will Auto Restart on unexpected shutdowns
|
getAddress, getDisplayName, getGroups, getMotd, getName, getPlayers, getSignature, getSubData, getTimestamp, isHidden, isRestricted, toString
public SubServer(YAMLSection raw)
raw
- JSON representation of the Serverpublic void refresh()
public void start(java.util.UUID player, Callback<java.lang.Integer> response)
player
- Player who Startedresponse
- Response Codepublic void start(Callback<java.lang.Integer> response)
response
- Response Codepublic void start(java.util.UUID player)
player
- Player who Startedpublic void start()
public void stop(java.util.UUID player, Callback<java.lang.Integer> response)
player
- Player who Stoppedresponse
- Response Codepublic void stop(Callback<java.lang.Integer> response)
response
- Response Codepublic void stop(java.util.UUID player)
player
- Player who Stoppedpublic void stop()
public void terminate(java.util.UUID player, Callback<java.lang.Integer> response)
player
- Player who Terminatedresponse
- Response Codepublic void terminate(Callback<java.lang.Integer> response)
response
- Response Codepublic void terminate(java.util.UUID player)
player
- Player who Terminatedpublic void terminate()
public void command(java.util.UUID player, java.lang.String command, Callback<java.lang.Integer> response)
player
- Player who Commandedcommand
- Commmand to Sendresponse
- Response Codepublic void command(java.lang.String command, Callback<java.lang.Integer> response)
command
- Commmand to Sendresponse
- Response Codepublic void command(java.util.UUID player, java.lang.String command)
player
- Player who Commandedcommand
- Command to Sendpublic void command(java.lang.String command)
command
- Command to Sendpublic boolean isRunning()
public void getHost(Callback<Host> callback)
callback
- The Hostpublic boolean isEnabled()
public boolean isEditable()
public boolean isLogging()
public java.lang.String getPath()
public java.lang.String getExecutable()
public java.lang.String getStopCommand()
public boolean willAutoRestart()
public boolean isCompatible(java.lang.String server)
server
- Server name to checkpublic java.util.List<java.lang.String> getIncompatibilities()
public java.util.List<java.lang.String> getCurrentIncompatibilities()
public boolean isTemporary()