public final class SubAPI
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
Host |
addHost(java.lang.Class<? extends Host> driver,
java.lang.String name,
boolean enabled,
java.net.InetAddress address,
java.lang.String directory,
java.lang.String gitBash)
Add a Host with a potentially unregistered driver to the Network
|
boolean |
addHost(Host host)
Add a Host with a potentially invalid/unregistered driver to the Network
|
Host |
addHost(java.lang.String driver,
java.lang.String name,
boolean enabled,
java.net.InetAddress address,
java.lang.String directory,
java.lang.String gitBash)
Add a Host to the Network
|
Host |
addHost(java.util.UUID player,
java.lang.Class<? extends Host> driver,
java.lang.String name,
boolean enabled,
java.net.InetAddress address,
java.lang.String directory,
java.lang.String gitBash)
Add a Host with a potentially unregistered driver to the Network
|
boolean |
addHost(java.util.UUID player,
Host host)
Add a Host with a potentially invalid/unregistered driver to the Network
|
Host |
addHost(java.util.UUID player,
java.lang.String driver,
java.lang.String name,
boolean enabled,
java.net.InetAddress address,
java.lang.String directory,
java.lang.String gitBash)
Add a Host to the Network
|
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
|
void |
addListener(java.lang.Runnable enable,
java.lang.Runnable reload,
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
|
boolean |
forceRemoveHost(java.lang.String name)
Force Remove a Host from the Network
|
boolean |
forceRemoveHost(java.util.UUID player,
java.lang.String name)
Force Remove a Host from the Network
|
boolean |
forceRemoveServer(java.lang.String name)
Force Remove a Server from the Network
|
boolean |
forceRemoveServer(java.util.UUID player,
java.lang.String name)
Force Remove a Server from the Network
|
Version |
getGameVersion()
Gets the Recommended Minecraft Version
|
java.util.Collection<NamedContainer<java.lang.String,java.util.UUID>> |
getGlobalPlayers()
Get players on this network across all known proxies
|
java.util.List<Server> |
getGroup(java.lang.String name)
Gets a Server Group (Group names are case insensitive here)
|
java.util.Map<java.lang.String,java.util.List<Server>> |
getGroups()
Gets the Server Groups (Group names are case sensitive here)
|
Host |
getHost(java.lang.String name)
Gets a Host
|
java.util.List<java.lang.String> |
getHostDrivers()
Get a list of all available Host Drivers
|
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(java.lang.String channel)
Gets values from the SubServers Lang
|
java.lang.String |
getLang(java.lang.String channel,
java.lang.String key)
Gets a value from the SubServers Lang
|
java.util.Collection<java.lang.String> |
getLangChannels()
Gets the current SubServers Lang Channels
|
java.util.Map<java.lang.String,java.util.List<Server>> |
getLowercaseGroups()
Gets the Server Groups (Group names are all lowercase here)
|
<R> R |
getObjectBySignature(java.lang.String signature)
Get an Object by it's Signature
|
java.util.Map<java.lang.String,Proxy> |
getProxies()
Gets the known Proxies
|
Proxy |
getProxy(java.lang.String name)
Gets a Proxy
|
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 |
invalidateObjectSignature(java.lang.String signature)
Invalidate an Object Signature.
|
boolean |
removeHost(java.lang.String name)
Remove a Host from the Network
|
boolean |
removeHost(java.util.UUID player,
java.lang.String name)
Remove a Host from the Network
|
boolean |
removeServer(java.lang.String name)
Remove a Server from the Network
|
boolean |
removeServer(java.util.UUID player,
java.lang.String name)
Remove a Server from the Network
|
void |
setLang(java.lang.String channel,
java.lang.String key,
java.lang.String value)
Adds to the SubServers Lang
|
java.lang.String |
signAnonymousObject()
Get an Object Signature without linking the Signature to any object
|
java.lang.String |
signObject(java.lang.Object object)
Signs an Object
|
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 disabled (your plugin should reset it's values in case this is a hard-reset instead of a shutdown)public void addListener(java.lang.Runnable enable, java.lang.Runnable reload, java.lang.Runnable disable)
enable
- An Event that will be called when SubAPI is readyreload
- An Event that will be called after SubAPI is soft-reloadeddisable
- An Event that will be called before SubAPI is disabled (your plugin should reset it's values in case this is a hard-reset instead of a shutdown)public SubDataServer getSubDataNetwork()
public void addHostDriver(java.lang.Class<? extends Host> driver, java.lang.String handle)
driver
- Driver to addhandle
- Handle to Bindpublic java.util.List<java.lang.String> getHostDrivers()
public java.util.Map<java.lang.String,Host> getHosts()
public Host getHost(java.lang.String name)
name
- Host namepublic Host addHost(java.lang.String driver, java.lang.String name, boolean enabled, java.net.InetAddress address, java.lang.String directory, java.lang.String gitBash) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.InstantiationException
driver
- Driver to initiatename
- Name of the Hostenabled
- Enabled Statusaddress
- Address of the Hostdirectory
- Directory of the HostgitBash
- Git Bash Directoryjava.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
public Host addHost(java.util.UUID player, java.lang.String driver, java.lang.String name, boolean enabled, java.net.InetAddress address, java.lang.String directory, java.lang.String gitBash) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.InstantiationException
player
- Player who addeddriver
- Driver to initiatename
- Name of the Hostenabled
- Enabled Statusaddress
- Address of the Hostdirectory
- Directory of the HostgitBash
- Git Bash Directoryjava.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
public Host addHost(java.lang.Class<? extends Host> driver, java.lang.String name, boolean enabled, java.net.InetAddress address, java.lang.String directory, java.lang.String gitBash) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.InstantiationException
driver
- Driver to initiatename
- Name of the Hostenabled
- Enabled Statusaddress
- Address of the Hostdirectory
- Directory of the HostgitBash
- Git Bash Directoryjava.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
public Host addHost(java.util.UUID player, java.lang.Class<? extends Host> driver, java.lang.String name, boolean enabled, java.net.InetAddress address, java.lang.String directory, java.lang.String gitBash) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.InstantiationException
player
- Player who addeddriver
- Driver to initiatename
- Name of the Hostenabled
- Enabled Statusaddress
- Address of the Hostdirectory
- Directory of the HostgitBash
- Git Bash Directoryjava.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
public boolean addHost(Host host)
host
- Host to addpublic boolean addHost(java.util.UUID player, Host host)
player
- Player who addedhost
- Host to addpublic boolean removeHost(java.lang.String name)
name
- Name of the Hostpublic boolean removeHost(java.util.UUID player, java.lang.String name)
player
- Player Removingname
- Name of the Hostpublic boolean forceRemoveHost(java.lang.String name)
name
- Name of the Hostpublic boolean forceRemoveHost(java.util.UUID player, java.lang.String name)
player
- Player Removingname
- Name of the Hostpublic java.util.Map<java.lang.String,java.util.List<Server>> getGroups()
public java.util.Map<java.lang.String,java.util.List<Server>> getLowercaseGroups()
public java.util.List<Server> getGroup(java.lang.String name)
name
- Group namepublic java.util.Map<java.lang.String,Server> getServers()
public Server getServer(java.lang.String name)
name
- Server namepublic 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 boolean removeServer(java.lang.String name)
name
- Name of the Serverpublic boolean removeServer(java.util.UUID player, java.lang.String name)
player
- Player Removingname
- Name of the Serverpublic boolean forceRemoveServer(java.lang.String name)
name
- Name of the Serverpublic boolean forceRemoveServer(java.util.UUID player, java.lang.String name)
player
- Player Removingname
- Name of the Serverpublic java.util.Map<java.lang.String,SubServer> getSubServers()
public SubServer getSubServer(java.lang.String name)
name
- SubServer namepublic java.util.Map<java.lang.String,Proxy> getProxies()
public Proxy getProxy(java.lang.String name)
name
- Proxy namepublic java.util.Collection<NamedContainer<java.lang.String,java.util.UUID>> getGlobalPlayers()
public void setLang(java.lang.String channel, java.lang.String key, java.lang.String value)
channel
- Lang Channelkey
- Keyvalue
- Lang Valuepublic java.util.Collection<java.lang.String> getLangChannels()
public java.util.Map<java.lang.String,java.lang.String> getLang(java.lang.String channel)
channel
- Lang Channelpublic java.lang.String getLang(java.lang.String channel, java.lang.String key)
channel
- Lang Channelkey
- Keypublic java.lang.String signAnonymousObject()
public java.lang.String signObject(java.lang.Object object)
object
- Object to Signpublic <R> R getObjectBySignature(java.lang.String signature)
R
- Expected Object Typesignature
- Object's Signaturepublic void invalidateObjectSignature(java.lang.String signature)
signature
- Object's Signaturepublic UniversalFile getRuntimeDirectory()
public Version getWrapperVersion()
public Version getProxyVersion()
public Version getGameVersion()