Interface SubServer

All Superinterfaces:
ClientHandler, ExtraDataHandler<String>, Server, ServerInfo, SubDataSerializable
All Known Implementing Classes:
ExternalSubServer, InternalSubServer, SubServerImpl

public interface SubServer extends Server
SubServer Interface
  • Method Details

    • start

      boolean start(UUID player)
      Starts the Server
      Parameters:
      player - Player who Started
      Returns:
      Success Status
    • start

      default boolean start()
      Starts the Server
      Returns:
      Success Status
    • stop

      boolean stop(UUID player)
      Stops the Server
      Parameters:
      player - Player who Stopped
      Returns:
      Success Status
    • stop

      default boolean stop()
      Stops the Server
      Returns:
      Success Status
    • terminate

      boolean terminate(UUID player)
      Terminates the Server
      Parameters:
      player - Player who Terminated
      Returns:
      Success Status
    • terminate

      default boolean terminate()
      Terminates the Server
      Returns:
      Success Status
    • edit

      default int edit(UUID player, ObjectMap<String> edit)
      Edits the Server
      Parameters:
      player - Player Editing
      edit - Edits
      Returns:
      Success Status
    • edit

      default int edit(ObjectMap<String> edit)
      Edits the Server
      Parameters:
      edit - Edits
      Returns:
      Success Status
    • permaEdit

      default int permaEdit(UUID player, ObjectMap<String> edit)
      Edits the Server (& Saves Changes)
      Parameters:
      player - Player Editing
      edit - Edits
      Returns:
      Success Status
    • permaEdit

      default int permaEdit(ObjectMap<String> edit)
      Edits the Server (& Saves Changes)
      Parameters:
      edit - Edits
      Returns:
      Success Status
    • waitFor

      void waitFor() throws InterruptedException
      Waits for the Server to Stop
      Throws:
      InterruptedException
    • isRunning

      boolean isRunning()
      If the Server is Running
      Returns:
      Running Status
    • isOnline

      boolean isOnline()
      If the Server is Online
      This method can only be true when a SubData connection is made!
      Returns:
      Online Status
    • isStopping

      boolean isStopping()
      If the Server is Stopping
      This method can only be true when the server is stopped through the server manager!
      Returns:
      Stopping Status
    • getHost

      Host getHost()
      Grabs the Host of the Server
      Returns:
      The Host
    • getTemplate

      Grabs the Template this Server was created from
      Returns:
      The Template
    • setTemplate

      void setTemplate(SubCreator.ServerTemplate value)
      Sets the Template this Server was created from
      Parameters:
      value - Value
    • setTemplate

      void setTemplate(String value)
      Sets the Template this Server was created from
      Parameters:
      value - Value
    • isAvailable

      boolean isAvailable()
      Is this Host Available?
      Returns:
      Availability Status
    • isEnabled

      boolean isEnabled()
      If the Server is Enabled
      Returns:
      Enabled Status
    • setEnabled

      void setEnabled(boolean value)
      Set if the Server is Enabled
      Parameters:
      value - Value
    • isEditable

      default boolean isEditable()
      If the Server is accepting requests to edit()
      Returns:
      Edit Status
      See Also:
    • isLogging

      boolean isLogging()
      If the Server is Logging
      Returns:
      Logging Status
    • setLogging

      void setLogging(boolean value)
      Set if the Server is Logging
      Parameters:
      value - Value
    • getLogger

      SubLogger getLogger()
      Get Process Logger
    • getCommandHistory

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

      String getPath()
      Get the Server Directory Path
      Returns:
      Server Directory Path
    • getFullPath

      default String getFullPath()
      Get the Full Server Directory Path
      Returns:
      Full Server Directory Path
    • getExecutable

      String getExecutable()
      Get the Server's Executable String
      Returns:
      Executable String
    • getStopCommand

      String getStopCommand()
      Grab the Command to Stop the Server
      Returns:
      Stop Command
    • setStopCommand

      void setStopCommand(String value)
      Set the Command that Stops the Server
      Parameters:
      value - Value
    • getStopAction

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

      void setStopAction(SubServer.StopAction action)
      Set the action the Server will take when it stops
      Parameters:
      action - Stop Action
    • toggleCompatibility

      void toggleCompatibility(SubServer... server)
      Toggles compatibility with other Servers
      Parameters:
      server - SubServers to toggle
    • isCompatible

      boolean isCompatible(SubServer server)
      Checks if a Server is compatible
      Parameters:
      server - Server to check
      Returns:
      Compatible Status
    • getIncompatibilities

      List<SubServer> getIncompatibilities()
      Get all listed incompatibilities for this Server
      Returns:
      Incompatibility List
    • getCurrentIncompatibilities

      List<SubServer> getCurrentIncompatibilities()
      Get incompatibility issues this server currently has
      Returns:
      Current Incompatibility List