net.ME1312.SubServers.Bungee

## Class SubAPI

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

    public final class SubAPI
    extends java.lang.Object

SubAPI Class

Author:
  ME1312

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`void` `addHostDriver(java.lang.Class<? extends Host> driver, java.lang.String handle)` Adds a Driver for Hosts
`void` `addLang(java.lang.String key, java.lang.String value)` Adds to the Language Map
`Server` `addServer(java.lang.String name, java.net.InetAddress ip, int port, java.lang.String motd, boolean hidden, boolean restricted)` Adds a Server to the Network
`Server` `addServer(java.util.UUID player, java.lang.String name, java.net.InetAddress ip, int port, java.lang.String motd, boolean hidden, boolean restricted)` Adds a Server to the Network
`Host` `getHost(java.lang.String name)` Gets a Host
`java.util.Map<java.lang.String,Host>` `getHosts()` Gets the Hosts
`static SubAPI` `getInstance()` Gets the SubAPI Methods
`SubPlugin` `getInternals()` Deprecated. Use SubAPI Methods when available
`java.util.Map<java.lang.String,java.lang.String>` `getLang()` Gets the SubServers Lang
`UniversalFile` `getRuntimeDirectory()` Gets the Runtime Directory
`Server` `getServer(java.lang.String name)` Gets a Server
`java.util.Map<java.lang.String,Server>` `getServers()` Gets the Servers (including SubServers)
`SubDataServer` `getSubDataNetwork()` Gets the SubData Network Manager
`SubServer` `getSubServer(java.lang.String name)` Gets a SubServer
`java.util.Map<java.lang.String,SubServer>` `getSubServers()` Gets the SubServers
`Version` `getWrapperVersion()` Gets the SubServers Version

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

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

### Method Detail

#### getInstance

    public static SubAPI getInstance()

Gets the SubAPI Methods

Returns:
  SubAPI

#### getInternals

    @Deprecated
    public SubPlugin getInternals()

Deprecated. Use SubAPI Methods when available
Gets the SubServers Internals

Returns:
  SubPlugin Internals

#### getSubDataNetwork

    public SubDataServer getSubDataNetwork()

Gets the SubData Network Manager

Returns:
  SubData Network Manager

#### addHostDriver

    public void addHostDriver(java.lang.Class<? extends Host> driver,
                              java.lang.String handle)

Adds a Driver for Hosts

Parameters:
  `driver` - Driver to add
  `handle` - Handle to Bind

#### getHosts

    public java.util.Map<java.lang.String,Host> getHosts()

Gets the Hosts

Returns:
  Host Map

#### getHost

    public Host getHost(java.lang.String name)

Gets a Host

Parameters:
  `name` - Host name
Returns:
  a Host

#### getServers

    public java.util.Map<java.lang.String,Server> getServers()

Gets the Servers (including SubServers)

Returns:
  Server Map

#### addServer

    public Server addServer(java.lang.String name,
                            java.net.InetAddress ip,
                            int port,
                            java.lang.String motd,
                            boolean hidden,
                            boolean restricted)

Adds a Server to the Network

Parameters:
  `name` - Name of the Server
  `ip` - IP of the Server
  `port` - Port of the Server
  `motd` - MOTD of the Server
  `hidden` - if the server should be hidden from players
  `restricted` - Players will need a permission to join if true
Returns:
  The Server

#### addServer

    public Server addServer(java.util.UUID player,
                            java.lang.String name,
                            java.net.InetAddress ip,
                            int port,
                            java.lang.String motd,
                            boolean hidden,
                            boolean restricted)

Adds a Server to the Network

Parameters:
  `player` - Player who added
  `name` - Name of the Server
  `ip` - IP of the Server
  `port` - Port of the Server
  `motd` - MOTD of the Server
  `hidden` - If the server should be hidden from players
  `restricted` - Players will need a permission to join if true
Returns:
  The Server

#### getServer

    public Server getServer(java.lang.String name)

Gets a Server

Parameters:
  `name` - Server name
Returns:
  a Server

#### getSubServers

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

Gets the SubServers

Returns:
  SubServer Map

#### getSubServer

    public SubServer getSubServer(java.lang.String name)

Gets a SubServer

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

#### getLang

    public java.util.Map<java.lang.String,java.lang.String> getLang()

Gets the SubServers Lang

Returns:
  SubServers Lang

#### addLang

    public void addLang(java.lang.String key,
                        java.lang.String value)

Adds to the Language Map

Parameters:
  `key` - Key
  `value` - Lang Value

#### getRuntimeDirectory

    public UniversalFile getRuntimeDirectory()

Gets the Runtime Directory

Returns:
  Directory

#### getWrapperVersion

    public Version getWrapperVersion()

Gets the SubServers Version

Returns:
  SubServers Version