public class InternalSubServer extends SubServerContainer
SubServer.LoggedCommand
Constructor and Description |
---|
InternalSubServer(InternalHost 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 start,
boolean restart,
boolean hidden,
boolean restricted,
boolean temporary)
Creates an Internal 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 Server 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 |
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 |
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 |
setEditable(boolean value)
Set if the Server should accept requests to edit()
|
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, getCurrentIncompatibilities, getFullPath, getIncompatibilities, isCompatible, start, stop, terminate, toggleCompatibility, toString
addExtra, addGroup, getDisplayName, getExtra, getExtra, getGroups, getMotd, getSubData, hasExtra, isHidden, isRestricted, removeExtra, removeGroup, setHidden, setMotd, setRestricted, setSubData
addPlayer, canAccess, equals, getAddress, getName, getPacketQueue, getPlayers, hashCode, ping, ping, removePlayer, sendData, sendData
addGroup, getDisplayName, getGroups, getMotd, isHidden, isRestricted, removeGroup, setHidden, setMotd, setRestricted
canAccess, getAddress, getName, getPlayers, ping, sendData, sendData
getSubData, setSubData
addExtra, getExtra, getExtra, hasExtra, removeExtra
public InternalSubServer(InternalHost 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 start, boolean restart, boolean hidden, boolean restricted, boolean temporary) throws InvalidServerException
host
- Hostname
- Nameenabled
- Enabled Statusport
- Port Numbermotd
- MOTDlog
- Logging Statusdirectory
- Directoryexecutable
- Executable Stringstopcmd
- Stop Commandstart
- Auto-Startrestart
- Auto-Restarthidden
- Hidden Statusrestricted
- Restricted Statustemporary
- Temporary StatusInvalidServerException
public boolean start(java.util.UUID player)
SubServer
player
- Player who Startedpublic boolean stop(java.util.UUID player)
SubServer
player
- Player who Stoppedpublic boolean terminate(java.util.UUID player)
SubServer
player
- Player who Terminatedpublic boolean command(java.util.UUID player, java.lang.String command)
SubServer
player
- Player who Commandedcommand
- Command to Sendpublic int edit(java.util.UUID player, YAMLSection edit)
SubServer
player
- Player Editingedit
- Editspublic void waitFor() throws java.lang.InterruptedException
SubServer
java.lang.InterruptedException
public boolean isRunning()
SubServer
public void setDisplayName(java.lang.String value)
Server
setDisplayName
in interface Server
setDisplayName
in class ServerContainer
value
- Value (or null to reset)public Host getHost()
SubServer
public boolean isEnabled()
SubServer
public void setEnabled(boolean value)
SubServer
value
- Valuepublic boolean isEditable()
SubServer
SubServer.edit(YAMLSection)
,
SubServer.edit(UUID, YAMLSection)
public void setEditable(boolean value)
SubServer
value
- Edit StatusSubServer.edit(YAMLSection)
,
SubServer.edit(UUID, YAMLSection)
public boolean isLogging()
SubServer
public void setLogging(boolean value)
SubServer
value
- Valuepublic SubLogger getLogger()
SubServer
public java.util.LinkedList<SubServer.LoggedCommand> getCommandHistory()
SubServer
public java.lang.String getPath()
SubServer
public Executable getExecutable()
SubServer
public java.lang.String getStopCommand()
SubServer
public void setStopCommand(java.lang.String value)
SubServer
value
- Valuepublic boolean willAutoRestart()
SubServer
public void setAutoRestart(boolean value)
SubServer
value
- Valuepublic boolean isTemporary()
SubServer
public void setTemporary(boolean value)
SubServer
value
- Value