Class ExternalSubServer

All Implemented Interfaces:
ServerInfo, ExtraDataHandler<String>, ClientHandler, SubDataSerializable, Server, SubServer

public class ExternalSubServer extends SubServerImpl
External SubServer Class
  • Constructor Details

  • Method Details

    • construct

      public static ExternalSubServer construct(ExternalHost host, String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted) throws InvalidServerException
      Creates an External SubServer
      Parameters:
      host - Host
      name - Name
      enabled - Enabled Status
      port - Port Number
      motd - MOTD
      log - Logging Status
      directory - Directory
      executable - Executable
      stopcmd - Stop Command
      hidden - Hidden Status
      restricted - Restricted Status
      Throws:
      InvalidServerException
    • start

      public boolean start(UUID player)
      Description copied from interface: SubServer
      Starts the Server
      Parameters:
      player - Player who Started
      Returns:
      Success Status
    • stop

      public boolean stop(UUID player)
      Description copied from interface: SubServer
      Stops the Server
      Parameters:
      player - Player who Stopped
      Returns:
      Success Status
    • terminate

      public boolean terminate(UUID player)
      Description copied from interface: SubServer
      Terminates the Server
      Parameters:
      player - Player who Terminated
      Returns:
      Success Status
    • command

      public boolean command(UUID player, String command)
      Description copied from interface: Server
      Commands the Server
      Parameters:
      player - Player who's Commanding
      command - Command to Send
    • edit

      protected int edit(UUID player, ObjectMap<String> edit, boolean perma)
      Description copied from class: SubServerImpl
      Edits the Server
      Overrides:
      edit in class SubServerImpl
      Parameters:
      player - Player Editing
      edit - Edits
      perma - Saves Changes
      Returns:
      Success Status
    • waitFor

      public void waitFor() throws InterruptedException
      Description copied from interface: SubServer
      Waits for the Server to Stop
      Throws:
      InterruptedException
    • isRunning

      public boolean isRunning()
      Description copied from interface: SubServer
      If the Server is Running
      Returns:
      Running Status
    • setDisplayName

      public void setDisplayName(String value)
      Description copied from interface: Server
      Sets the Display Name for this Server
      Specified by:
      setDisplayName in interface Server
      Overrides:
      setDisplayName in class ServerImpl
      Parameters:
      value - Value (or null to reset)
    • getHost

      public Host getHost()
      Description copied from interface: SubServer
      Grabs the Host of the Server
      Returns:
      The Host
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: SubServer
      If the Server is Enabled
      Returns:
      Enabled Status
    • setEnabled

      public void setEnabled(boolean value)
      Description copied from interface: SubServer
      Set if the Server is Enabled
      Parameters:
      value - Value
    • isLogging

      public boolean isLogging()
      Description copied from interface: SubServer
      If the Server is Logging
      Returns:
      Logging Status
    • setLogging

      public void setLogging(boolean value)
      Description copied from interface: SubServer
      Set if the Server is Logging
      Parameters:
      value - Value
    • getLogger

      public SubLogger getLogger()
      Description copied from interface: SubServer
      Get Process Logger
    • getCommandHistory

      public LinkedList<SubServer.LoggedCommand> getCommandHistory()
      Description copied from interface: SubServer
      Gets all the commands that were sent to this Server successfully
      Returns:
      Command History
    • getPath

      public String getPath()
      Description copied from interface: SubServer
      Get the Server Directory Path
      Returns:
      Server Directory Path
    • getExecutable

      public String getExecutable()
      Description copied from interface: SubServer
      Get the Server's Executable String
      Returns:
      Executable String
    • getStopCommand

      public String getStopCommand()
      Description copied from interface: SubServer
      Grab the Command to Stop the Server
      Returns:
      Stop Command
    • setStopCommand

      public void setStopCommand(String value)
      Description copied from interface: SubServer
      Set the Command that Stops the Server
      Parameters:
      value - Value
    • getStopAction

      public SubServer.StopAction getStopAction()
      Description copied from interface: SubServer
      Get the action the Server will take when it stops
      Returns:
      Stop Action
    • setStopAction

      public void setStopAction(SubServer.StopAction action)
      Description copied from interface: SubServer
      Set the action the Server will take when it stops
      Parameters:
      action - Stop Action