net.ME1312.SubServers.Bungee.Host

## Class Host

- java.lang.Object
- - net.ME1312.SubServers.Bungee.Host.Host

Direct Known Subclasses:
  InternalHost

    public abstract class Host
    extends java.lang.Object

Host Layout Class

Author:
  ME1312

### Constructor Summary

Constructors
Constructor and Description
`Host(SubPlugin plugin, java.lang.String name, java.lang.Boolean enabled, java.net.InetAddress address, java.lang.String directory, java.lang.String gitBash)` This constructor is required to launch your host from the drivers list.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`SubServer` `addSubServer(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)` Adds a SubServer
`abstract SubServer` `addSubServer(java.util.UUID player, 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)` Adds a SubServer
`int` `command(java.lang.String command, java.lang.String... servers)` Commands the Servers Specified
`abstract int` `command(java.util.UUID player, java.lang.String command, java.lang.String... servers)` Commands the Servers Specified
`boolean` `forceRemoveSubServer(java.lang.String name)` Forces the Removal of a SubServer
`abstract boolean` `forceRemoveSubServer(java.util.UUID player, java.lang.String name)` Forces the Removal of a SubServer
`abstract java.net.InetAddress` `getAddress()` Get the Address of this Host
`abstract SubCreator` `getCreator()` Gets the SubCreator Instance for this Host
`abstract java.lang.String` `getDirectory()` Get the Directory of this Host
`abstract java.lang.String` `getName()` Get the Name of this Host
`abstract SubServer` `getSubServer(java.lang.String name)` Gets a SubServer
`abstract java.util.Map<java.lang.String,? extends SubServer>` `getSubServers()` Gets the SubServers on this Host
`abstract boolean` `isEnabled()` Is this Host Enabled?
`boolean` `removeSubServer(java.lang.String name)` Removes a SubServer
`abstract boolean` `removeSubServer(java.util.UUID player, java.lang.String name)` Removes a SubServer
`abstract void` `setEnabled(boolean value)` Set if this Host is Enabled
`int` `start(java.lang.String... servers)` Starts the Servers Specified
`abstract int` `start(java.util.UUID player, java.lang.String... servers)` Starts the Servers Specified
`int` `stop(java.lang.String... servers)` Stops the Servers Specified
`abstract int` `stop(java.util.UUID player, java.lang.String... servers)` Stops the Servers Specified
`int` `terminate(java.lang.String... servers)` Terminates the Servers Specified
`abstract int` `terminate(java.util.UUID player, java.lang.String... servers)` Terminates the Servers Specified

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Host

    public Host(SubPlugin plugin,
                java.lang.String name,
                java.lang.Boolean enabled,
                java.net.InetAddress address,
                java.lang.String directory,
                java.lang.String gitBash)

This constructor is required to launch your host from the drivers list. Do not add or remove any arguments.

Parameters:
  `plugin` - SubServers Internals
  `name` - The Name of your Host
  `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 Detail

#### isEnabled

    public abstract boolean isEnabled()

Is this Host Enabled?

Returns:
  Enabled Status

#### setEnabled

    public abstract void setEnabled(boolean value)

Set if this Host is Enabled

Parameters:
  `value` - Value

#### getAddress

    public abstract java.net.InetAddress getAddress()

Get the Address of this Host

Returns:
  Host Address

#### getDirectory

    public abstract java.lang.String getDirectory()

Get the Directory of this Host

Returns:
  Host Directory

#### getName

    public abstract java.lang.String getName()

Get the Name of this Host

Returns:
  Host Name

#### start

    public int start(java.lang.String... servers)

Starts the Servers Specified

Parameters:
  `servers` - Servers
Returns:
  Success Status

#### start

    public abstract int start(java.util.UUID player,
                              java.lang.String... servers)

Starts the Servers Specified

Parameters:
  `player` - Player who started
  `servers` - Servers
Returns:
  Success Status

#### stop

    public int stop(java.lang.String... servers)

Stops the Servers Specified

Parameters:
  `servers` - Servers
Returns:
  Success Status

#### stop

    public abstract int stop(java.util.UUID player,
                             java.lang.String... servers)

Stops the Servers Specified

Parameters:
  `player` - Player who started
  `servers` - Servers
Returns:
  Success Status

#### terminate

    public int terminate(java.lang.String... servers)

Terminates the Servers Specified

Parameters:
  `servers` - Servers
Returns:
  Success Status

#### terminate

    public abstract int terminate(java.util.UUID player,
                                  java.lang.String... servers)

Terminates the Servers Specified

Parameters:
  `player` - Player who started
  `servers` - Servers
Returns:
  Success Status

#### command

    public int command(java.lang.String command,
                       java.lang.String... servers)

Commands the Servers Specified

Parameters:
  `command` - Command to send
  `servers` - Servers
Returns:
  Success Status

#### command

    public abstract int command(java.util.UUID player,
                                java.lang.String command,
                                java.lang.String... servers)

Commands the Servers Specified

Parameters:
  `player` - Player who started
  `command` - Command to send
  `servers` - Servers
Returns:
  Success Status

#### getCreator

    public abstract SubCreator getCreator()

Gets the SubCreator Instance for this Host

Returns:
  SubCreator

#### getSubServers

    public abstract java.util.Map<java.lang.String,? extends SubServer> getSubServers()

Gets the SubServers on this Host

Returns:
  SubServer Map

#### getSubServer

    public abstract SubServer getSubServer(java.lang.String name)

Gets a SubServer

Parameters:
  `name` - SubServer Name
Returns:
  a SubServer

#### addSubServer

    public abstract SubServer addSubServer(java.util.UUID player,
                                           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

Adds a SubServer

Parameters:
  `player` - Player who Added
  `name` - Name of Server
  `enabled` - Enabled Status
  `port` - Port Number
  `motd` - Motd of the Server
  `log` - Logging Status
  `directory` - Directory
  `executable` - Executable
  `stopcmd` - Command to Stop the Server
  `restart` - Auto Restart Status
  `hidden` - if the server should be hidden from players
  `restricted` - Players will need a permission to join if true
  `temporary` - Temporary Status
Returns:
  The SubServer
Throws:
  `InvalidServerException`

#### addSubServer

    public SubServer addSubServer(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

Adds a SubServer

Parameters:
  `name` - Name of Server
  `enabled` - Enabled Status
  `port` - Port Number
  `motd` - Motd of the Server
  `log` - Logging Status
  `directory` - Directory
  `executable` - Executable
  `stopcmd` - Command to Stop the Server
  `restart` - Auto Restart Status
  `hidden` - if the server should be hidden from players
  `restricted` - Players will need a permission to join if true
  `temporary` - Temporary Status
Returns:
  The SubServer
Throws:
  `InvalidServerException`

#### removeSubServer

    public boolean removeSubServer(java.lang.String name)
                            throws java.lang.InterruptedException

Removes a SubServer

Parameters:
  `name` - SubServer Name
Returns:
  Success Status
Throws:
  `java.lang.InterruptedException`

#### removeSubServer

    public abstract boolean removeSubServer(java.util.UUID player,
                                            java.lang.String name)
                                     throws java.lang.InterruptedException

Removes a SubServer

Parameters:
  `player` - Player Removing
  `name` - SubServer Name
Returns:
  Success Status
Throws:
  `java.lang.InterruptedException`

#### forceRemoveSubServer

    public boolean forceRemoveSubServer(java.lang.String name)

Forces the Removal of a SubServer

Parameters:
  `name` - SubServer Name

#### forceRemoveSubServer

    public abstract boolean forceRemoveSubServer(java.util.UUID player,
                                                 java.lang.String name)

Forces the Removal of a SubServer

Parameters:
  `player` - Player Removing
  `name` - SubServer Name