public final class SubAPI
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addHostDriver(java.lang.Class<? extends Host> driver,
java.lang.String handle)
Adds a Driver for Hosts
|
void |
addListener(java.lang.Runnable enable,
java.lang.Runnable disable)
Adds a SubAPI Listener
|
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
|
Version |
getBetaVersion()
Gets the SubServers Beta Version
|
Version |
getGameVersion()
Gets the Recommended Minecraft Version
|
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
|
java.lang.String |
getLang(java.lang.String key)
Gets a value from the SubServers Lang
|
Version |
getProxyVersion()
Gets the BungeeCord Version
|
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
|
void |
setLang(java.lang.String key,
java.lang.String value)
Adds to the Language Map
|
public static SubAPI getInstance()
@Deprecated public SubPlugin getInternals()
public void addListener(java.lang.Runnable enable, java.lang.Runnable disable)
enable
- An Event that will be called when SubAPI is readydisable
- An Event that will be called before SubAPI is disabledpublic SubDataServer getSubDataNetwork()
public void addHostDriver(java.lang.Class<? extends Host> driver, java.lang.String handle)
driver
- Driver to addhandle
- Handle to Bindpublic java.util.Map<java.lang.String,Host> getHosts()
public Host getHost(java.lang.String name)
name
- Host namepublic java.util.Map<java.lang.String,Server> getServers()
public Server addServer(java.lang.String name, java.net.InetAddress ip, int port, java.lang.String motd, boolean hidden, boolean restricted)
name
- Name of the Serverip
- IP of the Serverport
- Port of the Servermotd
- MOTD of the Serverhidden
- if the server should be hidden from playersrestricted
- Players will need a permission to join if truepublic Server addServer(java.util.UUID player, java.lang.String name, java.net.InetAddress ip, int port, java.lang.String motd, boolean hidden, boolean restricted)
player
- Player who addedname
- Name of the Serverip
- IP of the Serverport
- Port of the Servermotd
- MOTD of the Serverhidden
- If the server should be hidden from playersrestricted
- Players will need a permission to join if truepublic Server getServer(java.lang.String name)
name
- Server namepublic java.util.Map<java.lang.String,SubServer> getSubServers()
public SubServer getSubServer(java.lang.String name)
name
- SubServer namepublic void setLang(java.lang.String key, java.lang.String value)
key
- Keyvalue
- Lang Valuepublic java.lang.String getLang(java.lang.String key)
key
- Keypublic java.util.Map<java.lang.String,java.lang.String> getLang()
public UniversalFile getRuntimeDirectory()
public Version getBetaVersion()
public Version getWrapperVersion()
public Version getProxyVersion()
public Version getGameVersion()