net.ME1312.SubServers.Bungee.Host

## Class SubServer

- java.lang.Object
- - net.md_5.bungee.BungeeServerInfo
  - - net.ME1312.SubServers.Bungee.Host.Server
    - - net.ME1312.SubServers.Bungee.Host.SubServer

All Implemented Interfaces:
  net.md_5.bungee.api.config.ServerInfo, ClientHandler

Direct Known Subclasses:
  InternalSubServer

    public abstract class SubServer
    extends Server

SubServer Layout Class

Author:
  ME1312

### Constructor Summary

Constructors
Constructor and Description
`SubServer(Host host, java.lang.String name, int port, java.lang.String motd, boolean hidden, boolean restricted)` Creates a SubServer

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`boolean` `command(java.lang.String command)` Commands the Server
`abstract boolean` `command(java.util.UUID player, java.lang.String command)` Commands the Server
`abstract java.lang.String` `getDirectory()` Get the Server Directory
`abstract Host` `getHost()` Grabs the Host of the Server
`abstract java.lang.String` `getStopCommand()` Grab the Command to Stop the Server
`abstract boolean` `isEnabled()` If the Server is Enabled
`abstract boolean` `isLogging()` If the Server is Logging
`abstract boolean` `isRunning()` If the Server is Running
`abstract boolean` `isTemporary()` If the Server is Temporary
`abstract void` `setAutoRestart(boolean value)` Set if the Server will Auto Restart on unexpected shutdowns
`abstract void` `setEnabled(boolean value)` Set if the Server is Enabled
`abstract void` `setLogging(boolean value)` Set if the Server is Logging
`abstract void` `setStopCommand(java.lang.String value)` Set the Command that Stops the Server
`boolean` `start()` Starts the Server
`abstract boolean` `start(java.util.UUID player)` Starts the Server
`boolean` `stop()` Stops the Server
`abstract boolean` `stop(java.util.UUID player)` Stops the Server
`boolean` `terminate()` Terminates the Server
`abstract boolean` `terminate(java.util.UUID player)` Terminates the Server
`abstract void` `waitFor()` Waits for the Server to Stop
`abstract boolean` `willAutoRestart()` If the Server will Auto Restart on unexpected shutdowns

### Methods inherited from class net.ME1312.SubServers.Bungee.Host.Server

`getMotd, getSubDataClient, isHidden, isRestricted, linkSubDataClient, setHidden, setMotd, setRestricted`

### Methods inherited from class net.md_5.bungee.BungeeServerInfo

`addPlayer, canAccess, equals, getAddress, getName, getPacketQueue, getPlayers, hashCode, ping, ping, removePlayer, sendData, sendData, toString`

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

`getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SubServer

    public SubServer(Host host,
                     java.lang.String name,
                     int port,
                     java.lang.String motd,
                     boolean hidden,
                     boolean restricted)
              throws InvalidServerException

Creates a SubServer

Parameters:
  `host` - Host
  `name` - Server Name
  `port` - Port Number
  `motd` - Server MOTD
  `restricted` - Players will need a permission to join if true
Throws:
  `InvalidServerException`

### Method Detail

#### start

    public abstract boolean start(java.util.UUID player)

Starts the Server

Parameters:
  `player` - Player who Started
Returns:
  Success Status

#### start

    public boolean start()

Starts the Server

Returns:
  Success Status

#### stop

    public abstract boolean stop(java.util.UUID player)

Stops the Server

Parameters:
  `player` - Player who Stopped
Returns:
  Success Status

#### stop

    public boolean stop()

Stops the Server

Returns:
  Success Status

#### terminate

    public abstract boolean terminate(java.util.UUID player)

Terminates the Server

Parameters:
  `player` - Player who Terminated
Returns:
  Success Status

#### terminate

    public boolean terminate()

Terminates the Server

Returns:
  Success Status

#### command

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

Commands the Server

Parameters:
  `player` - Player who Commanded
  `command` - Command to Send
Returns:
  Success Status

#### command

    public boolean command(java.lang.String command)

Commands the Server

Parameters:
  `command` - Command to Send
Returns:
  Success Status

#### waitFor

    public abstract void waitFor()
                          throws java.lang.InterruptedException

Waits for the Server to Stop

Throws:
  `java.lang.InterruptedException`

#### isRunning

    public abstract boolean isRunning()

If the Server is Running

Returns:
  Running Status

#### getHost

    public abstract Host 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

#### getDirectory

    public abstract java.lang.String getDirectory()

Get the Server Directory

Returns:
  Server Directory

#### getStopCommand

    public abstract java.lang.String getStopCommand()

Grab the Command to Stop the Server

Returns:
  Stop Command

#### setStopCommand

    public abstract void setStopCommand(java.lang.String value)

Set the Command that Stops the Server

Parameters:
  `value` - Value

#### willAutoRestart

    public abstract boolean willAutoRestart()

If the Server will Auto Restart on unexpected shutdowns

Returns:
  Auto Restart Status

#### setAutoRestart

    public abstract void setAutoRestart(boolean value)

Set if the Server will Auto Restart on unexpected shutdowns

Parameters:
  `value` - Value

#### isTemporary

    public abstract boolean isTemporary()

If the Server is Temporary

Returns:
  Temporary Status