Class InternalHost

java.lang.Object
net.ME1312.SubServers.Bungee.Host.Host
net.ME1312.SubServers.Bungee.Host.Internal.InternalHost
All Implemented Interfaces:
ExtraDataHandler<String>

public class InternalHost extends Host
Internal Host Class
  • Field Details

    • DRM_ALLOW

      public static final boolean DRM_ALLOW
  • Constructor Details

    • InternalHost

      public InternalHost(SubProxy plugin, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash)
      Creates an Internal Host
      Parameters:
      plugin - SubServers Internals
      name - The Name of your Host
      ports - The range of ports to auto-select from
      log - Whether apps like SubCreator should log to console (does not apply to servers)
      enabled - If your host is Enabled
      address - The address of your Host
      directory - The runtime directory of your Host
      gitBash - The Git Bash directory
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Description copied from class: Host
      Is this Host Enabled?
      Specified by:
      isEnabled in class Host
      Returns:
      Enabled Status
    • setEnabled

      public void setEnabled(boolean value)
      Description copied from class: Host
      Set if this Host is Enabled
      Specified by:
      setEnabled in class Host
      Parameters:
      value - Value
    • getAddress

      public InetAddress getAddress()
      Description copied from class: Host
      Get the Address of this Host
      Specified by:
      getAddress in class Host
      Returns:
      Host Address
    • getPath

      public String getPath()
      Description copied from class: Host
      Get the host Directory Path
      Specified by:
      getPath in class Host
      Returns:
      Host Directory Path
    • getName

      public String getName()
      Description copied from class: Host
      Get the Name of this Host
      Specified by:
      getName in class Host
      Returns:
      Host Name
    • getCreator

      public SubCreator getCreator()
      Description copied from class: Host
      Gets the SubCreator Instance for this Host
      Specified by:
      getCreator in class Host
      Returns:
      SubCreator
    • getSubServers

      public Map<String,? extends SubServer> getSubServers()
      Description copied from class: Host
      Gets the SubServers on this Host
      Specified by:
      getSubServers in class Host
      Returns:
      SubServer Map
    • getSubServer

      public SubServer getSubServer(String name)
      Description copied from class: Host
      Gets a SubServer
      Specified by:
      getSubServer in class Host
      Parameters:
      name - SubServer Name
      Returns:
      a SubServer
    • constructSubServer

      public SubServer constructSubServer(String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted) throws InvalidServerException
      Description copied from class: Host
      Constructs a SubServer (but doesn't add it to the server manager)
      Specified by:
      constructSubServer in class Host
      Parameters:
      name - Name of Server
      enabled - Enabled Status
      port - Port Number
      motd - Motd of the Server
      log - Logging Status
      directory - Directory
      executable - Executable String
      stopcmd - Command to Stop the Server
      hidden - if the server should be hidden from players
      restricted - Players will need a permission to join if true
      Returns:
      The SubServer
      Throws:
      InvalidServerException
    • addSubServer

      public boolean addSubServer(UUID player, SubServer server) throws InvalidServerException
      Description copied from class: Host
      Adds a SubServer
      Specified by:
      addSubServer in class Host
      Parameters:
      player - Player who added
      server - SubServer to add
      Returns:
      Success status
      Throws:
      InvalidServerException
    • removeSubServer

      protected boolean removeSubServer(UUID player, String name, boolean forced) throws InterruptedException
      Description copied from class: Host
      Removes a SubServer
      Specified by:
      removeSubServer in class Host
      Parameters:
      player - Player Removing
      name - SubServer Name
      forced - Forces the Removal
      Returns:
      Success Status
      Throws:
      InterruptedException
    • recycleSubServer

      protected boolean recycleSubServer(UUID player, String name, boolean forced) throws InterruptedException
      Description copied from class: Host
      Deletes a SubServer (will move to 'Recently Deleted')
      Specified by:
      recycleSubServer in class Host
      Parameters:
      player - Player Deleting
      name - SubServer Name
      forced - Forces the Deletion
      Returns:
      Success Status
      Throws:
      InterruptedException
    • recycleSubServer

      protected boolean recycleSubServer(UUID player, String name, boolean forced, boolean multithreading) throws InterruptedException
      Deletes a SubServer (will move to 'Recently Deleted')
      Parameters:
      player - Player Deleting
      name - SubServer Name
      forced - Forces the Deletion
      multithreading - Uses Multithreading for I/O
      Returns:
      Success Status
      Throws:
      InterruptedException
    • deleteSubServer

      protected boolean deleteSubServer(UUID player, String name, boolean forced) throws InterruptedException
      Description copied from class: Host
      Deletes a SubServer
      Specified by:
      deleteSubServer in class Host
      Parameters:
      player - Player Deleting
      name - SubServer Name
      forced - Forces the Deletion
      Returns:
      Success Status
      Throws:
      InterruptedException
    • deleteSubServer

      protected boolean deleteSubServer(UUID player, String name, boolean forced, boolean multithreading) throws InterruptedException
      Deletes a SubServer
      Parameters:
      player - Player Deleting
      name - SubServer Name
      forced - Forces the Deletion
      multithreading - Uses Multithreading for I/O
      Returns:
      Success Status
      Throws:
      InterruptedException