Class SubServerController
java.lang.Object
net.ME1312.SubServers.Bungee.Host.SubServerController
API-Safe SubServer Layout Class
-
Constructor Summary
ConstructorsConstructorDescriptionSubServerController(Host host, String name, int port, String motd, boolean hidden, boolean restricted) Creates a SubServer -
Method Summary
Modifier and TypeMethodDescriptionbooleanCommands the Serverabstract booleanCommands the Serverprotected intEdits the Serverget()Get the SubServer that is being controlledabstract LinkedList<SubServer.LoggedCommand>Gets all the commands that were sent to this Server successfullyabstract StringGet the Server's Executable Stringabstract HostgetHost()Grabs the Host of the Serverabstract SubLoggerGet Process Loggerabstract StringgetPath()Get the Server Directory Pathabstract SubServer.StopActionGet the action the Server will take when it stopsabstract StringGrab the Command to Stop the Serverabstract booleanIf the Server is Enabledabstract booleanIf the Server is Loggingabstract booleanIf the Server is Runningabstract voidsetEnabled(boolean value) Set if the Server is Enabledabstract voidsetLogging(boolean value) Set if the Server is Loggingabstract voidsetStopAction(SubServer.StopAction action) Set the action the Server will take when it stopsabstract voidsetStopCommand(String value) Set the Command that Stops the Serverbooleanstart()Starts the Serverabstract booleanStarts the Serverbooleanstop()Stops the Serverabstract booleanStops the ServerbooleanTerminates the Serverabstract booleanTerminates the Serverabstract voidwaitFor()Waits for the Server to Stop
-
Constructor Details
-
SubServerController
public SubServerController(Host host, String name, int port, String motd, boolean hidden, boolean restricted) throws InvalidServerException Creates a SubServer- Parameters:
host- Hostname- Server Nameport- Port Numbermotd- Server MOTDrestricted- Players will need a permission to join if true- Throws:
InvalidServerException
-
-
Method Details
-
get
Get the SubServer that is being controlled- Returns:
- SubServer
-
start
Starts the Server- Parameters:
player- Player who Started- Returns:
- Success Status
-
start
public boolean start()Starts the Server- Returns:
- Success Status
-
stop
Stops the Server- Parameters:
player- Player who Stopped- Returns:
- Success Status
-
stop
public boolean stop()Stops the Server- Returns:
- Success Status
-
terminate
Terminates the Server- Parameters:
player- Player who Terminated- Returns:
- Success Status
-
terminate
public boolean terminate()Terminates the Server- Returns:
- Success Status
-
command
Commands the Server- Parameters:
player- Player who's Commandingcommand- Command to Send- Returns:
- Success Status
-
command
Commands the Server- Parameters:
command- Command to Send- Returns:
- Success Status
-
edit
Edits the Server- Parameters:
player- Player Editingedit- Editsperma- Saves Changes- Returns:
- Success Status
-
waitFor
Waits for the Server to Stop- Throws:
InterruptedException
-
isRunning
public abstract boolean isRunning()If the Server is Running- Returns:
- Running Status
-
getHost
Grabs the Host of the Server- Returns:
- The Host
-
isEnabled
public abstract boolean isEnabled()If the Server is Enabled- Returns:
- Enabled Status
-
setEnabled
public abstract void setEnabled(boolean value) Set if the Server is Enabled- Parameters:
value- Value
-
isLogging
public abstract boolean isLogging()If the Server is Logging- Returns:
- Logging Status
-
setLogging
public abstract void setLogging(boolean value) Set if the Server is Logging- Parameters:
value- Value
-
getLogger
Get Process Logger -
getCommandHistory
Gets all the commands that were sent to this Server successfully- Returns:
- Command History
-
getPath
Get the Server Directory Path- Returns:
- Server Directory Path
-
getExecutable
Get the Server's Executable String- Returns:
- Executable String
-
getStopCommand
Grab the Command to Stop the Server- Returns:
- Stop Command
-
setStopCommand
Set the Command that Stops the Server- Parameters:
value- Value
-
getStopAction
Get the action the Server will take when it stops- Returns:
- Stop Action
-
setStopAction
Set the action the Server will take when it stops- Parameters:
action- Stop Action
-