Package net.ME1312.SubServers.Bungee
Class SubAPI
java.lang.Object
net.ME1312.SubServers.Bungee.SubAPI
- All Implemented Interfaces:
BungeeAPI
SubAPI Class
-
Method Summary
Modifier and TypeMethodDescriptionaddHost
(Class<? extends Host> driver, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) Add a Host with a potentially unregistered driver to the NetworkaddHost
(String driver, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) Add a Host to the NetworkaddHost
(UUID player, Class<? extends Host> driver, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) Add a Host with a potentially unregistered driver to the NetworkaddHost
(UUID player, String driver, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) Add a Host to the Networkboolean
Add a Host with a potentially invalid/unregistered driver to the Networkboolean
Add a Host with a potentially invalid/unregistered driver to the Networkvoid
addHostDriver
(Class<? extends Host> driver, String handle) Adds a Driver for Hostsvoid
addListener
(Runnable reload) Adds a SubAPI Reload ListeneraddServer
(String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted) Adds a Server to the NetworkaddServer
(UUID player, String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted) Adds a Server to the Networkboolean
Adds a Server to the Networkboolean
Adds a Server to the Networkboolean
forceRemoveHost
(String name) Force Remove a Host from the Networkboolean
forceRemoveHost
(UUID player, String name) Force Remove a Host from the Networkboolean
forceRemoveServer
(String name) Force Remove a Server from the Networkboolean
forceRemoveServer
(UUID player, String name) Force Remove a Server from the NetworkVersion[]
Get an array of compatible Minecraft VersionsGets a Server Group (Group names are case insensitive here)Gets the Server Groups (Group names are case sensitive here)Gets a HostGet a list of all available Host DriversgetHosts()
Gets the Hostsstatic SubAPI
Gets the SubAPI MethodsDeprecated.Use SubAPI Methods when availableGets values from the SubServers LangGets the current SubServers Lang ChannelsGets the Server Groups (Group names are all lowercase here)Get the Master Proxy Value<R> R
getObjectBySignature
(String signature) Get an Object by it's SignatureGets the known ProxiesGets a ProxyGets the BungeeCord VersiongetRemotePlayer
(String name) Get a player on this network by searching across all known proxiesgetRemotePlayer
(UUID id) Get a player on this network by searching across all known proxiesint
Get the number of players on this network across all known proxiesGet players on this network across all known proxiesgetRemotePlayers
(ServerInfo server) Get players on this server across all known proxiesGets the Runtime DirectoryGets a ServerGets the Servers (including SubServers)Gets the SubData NetworkGets the SubData Network ProtocolgetSubServer
(String name) Gets a SubServerGets the SubServersGets the SubServers Build SignatureGets the SubServers Versionvoid
invalidateObjectSignature
(String signature) Invalidate an Object Signature.boolean
removeHost
(String name) Remove a Host from the Networkboolean
removeHost
(UUID player, String name) Remove a Host from the Networkboolean
removeServer
(String name) Remove a Server from the Networkboolean
removeServer
(UUID player, String name) Remove a Server from the Networkvoid
Adds to the SubServers LangGet an Object Signature without linking the Signature to any objectsignObject
(Object object) Signs an Object
-
Method Details
-
getInstance
Gets the SubAPI Methods- Returns:
- SubAPI
-
getInternals
Deprecated.Use SubAPI Methods when availableGets the SubServers Internals- Specified by:
getInternals
in interfaceBungeeAPI
- Returns:
- SubPlugin Internals
-
addListener
Adds a SubAPI Reload Listener- Parameters:
reload
- An Event that will be called after SubAPI is soft-reloaded
-
getSubDataNetwork
Gets the SubData Network- Returns:
- SubData Network
-
getSubDataProtocol
Gets the SubData Network Protocol- Returns:
- SubData Network Protocol
-
addHostDriver
Adds a Driver for Hosts- Parameters:
driver
- Driver to addhandle
- Handle to Bind
-
getHostDrivers
Get a list of all available Host Drivers- Returns:
- Host Driver handle list
-
getHosts
Gets the Hosts- Returns:
- Host Map
-
getHost
Gets a Host- Parameters:
name
- Host name- Returns:
- a Host
-
addHost
public Host addHost(String driver, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException Add a Host to the Network- Parameters:
driver
- Driver to initiatename
- The Name of your Hostports
- The range of ports to auto-select fromlog
- Whether apps like SubCreator should log to console (does not apply to servers)enabled
- If your host is Enabledaddress
- The address of your Hostdirectory
- The runtime directory of your HostgitBash
- The Git Bash directory- Returns:
- The Host
- Throws:
NoSuchMethodException
IllegalAccessException
InvocationTargetException
InstantiationException
-
addHost
public Host addHost(UUID player, String driver, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException Add a Host to the Network- Parameters:
player
- Player who addeddriver
- Driver to initiatename
- The Name of your Hostports
- The range of ports to auto-select fromlog
- Whether apps like SubCreator should log to console (does not apply to servers)enabled
- If your host is Enabledaddress
- The address of your Hostdirectory
- The runtime directory of your HostgitBash
- The Git Bash directory- Returns:
- The Host
- Throws:
NoSuchMethodException
IllegalAccessException
InvocationTargetException
InstantiationException
-
addHost
public Host addHost(Class<? extends Host> driver, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException Add a Host with a potentially unregistered driver to the Network- Parameters:
driver
- Driver to initiatename
- The Name of your Hostports
- The range of ports to auto-select fromlog
- Whether apps like SubCreator should log to console (does not apply to servers)enabled
- If your host is Enabledaddress
- The address of your Hostdirectory
- The runtime directory of your HostgitBash
- The Git Bash directory- Returns:
- The Host
- Throws:
NoSuchMethodException
IllegalAccessException
InvocationTargetException
InstantiationException
-
addHost
public Host addHost(UUID player, Class<? extends Host> driver, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException Add a Host with a potentially unregistered driver to the Network- Parameters:
player
- Player who addeddriver
- Driver to initiatename
- The Name of your Hostports
- The range of ports to auto-select fromlog
- Whether apps like SubCreator should log to console (does not apply to servers)enabled
- If your host is Enabledaddress
- The address of your Hostdirectory
- The runtime directory of your HostgitBash
- The Git Bash directory- Returns:
- The Host
- Throws:
NoSuchMethodException
IllegalAccessException
InvocationTargetException
InstantiationException
-
addHost
Add a Host with a potentially invalid/unregistered driver to the Network- Parameters:
host
- Host to add- Returns:
- Success status
-
addHost
Add a Host with a potentially invalid/unregistered driver to the Network- Parameters:
player
- Player who addedhost
- Host to add- Returns:
- Success status
-
removeHost
Remove a Host from the Network- Parameters:
name
- Name of the Host- Returns:
- Success Status
-
removeHost
Remove a Host from the Network- Parameters:
player
- Player Removingname
- Name of the Host- Returns:
- Success Status
-
forceRemoveHost
Force Remove a Host from the Network- Parameters:
name
- Name of the Host- Returns:
- Success Status
-
forceRemoveHost
Force Remove a Host from the Network- Parameters:
player
- Player Removingname
- Name of the Host- Returns:
- Success Status
-
getGroups
Gets the Server Groups (Group names are case sensitive here)- Returns:
- Group Map
-
getLowercaseGroups
Gets the Server Groups (Group names are all lowercase here)- Returns:
- Group Map
-
getGroup
Gets a Server Group (Group names are case insensitive here)- Parameters:
name
- Group name- Returns:
- a Server Group
-
getServers
Gets the Servers (including SubServers)- Returns:
- Server Map
-
getServer
Gets a Server- Parameters:
name
- Server name- Returns:
- a Server
-
addServer
public Server addServer(String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted) Adds a Server to the Network- Parameters:
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 true- Returns:
- The Server
-
addServer
public Server addServer(UUID player, String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted) Adds a Server to the Network- Parameters:
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 true- Returns:
- The Server
-
addServer
Adds a Server to the Network- Parameters:
server
- Server to add- Returns:
- Success status
-
addServer
Adds a Server to the Network- Parameters:
player
- Player who addedserver
- Server to add- Returns:
- Success status
-
removeServer
Remove a Server from the Network- Parameters:
name
- Name of the Server- Returns:
- Success Status
-
removeServer
Remove a Server from the Network- Parameters:
player
- Player Removingname
- Name of the Server- Returns:
- Success Status
-
forceRemoveServer
Force Remove a Server from the Network- Parameters:
name
- Name of the Server- Returns:
- Success Status
-
forceRemoveServer
Force Remove a Server from the Network- Parameters:
player
- Player Removingname
- Name of the Server- Returns:
- Success Status
-
getSubServers
Gets the SubServers- Returns:
- SubServer Map
-
getSubServer
Gets a SubServer- Parameters:
name
- SubServer name- Returns:
- a SubServer
-
getProxies
Gets the known Proxies- Returns:
- Proxy Map
-
getProxy
Gets a Proxy- Parameters:
name
- Proxy name- Returns:
- a Proxy
-
getMasterProxy
Get the Master Proxy Value- Returns:
- Master Proxy
-
getRemotePlayerCount
public int getRemotePlayerCount()Get the number of players on this network across all known proxies- Specified by:
getRemotePlayerCount
in interfaceBungeeAPI
- Returns:
- Remote Player Count
-
getRemotePlayers
Get players on this server across all known proxies- Specified by:
getRemotePlayers
in interfaceBungeeAPI
- Parameters:
server
- Server to search- Returns:
- Remote Player Map
-
getRemotePlayers
Get players on this network across all known proxies- Specified by:
getRemotePlayers
in interfaceBungeeAPI
- Returns:
- Remote Player Map
-
getRemotePlayer
Get a player on this network by searching across all known proxies- Specified by:
getRemotePlayer
in interfaceBungeeAPI
- Parameters:
name
- Player name- Returns:
- Remote Player
-
getRemotePlayer
Get a player on this network by searching across all known proxies- Specified by:
getRemotePlayer
in interfaceBungeeAPI
- Parameters:
id
- Player UUID- Returns:
- Remote Player
-
setLang
Adds to the SubServers Lang- Parameters:
channel
- Lang Channelkey
- Keyvalue
- Lang Value
-
getLangChannels
Gets the current SubServers Lang Channels- Specified by:
getLangChannels
in interfaceBungeeAPI
- Returns:
- SubServers Lang Channel list
-
getLang
Gets values from the SubServers Lang -
signAnonymousObject
Get an Object Signature without linking the Signature to any object- Returns:
- Anonymous Object Signature
-
signObject
Signs an Object- Parameters:
object
- Object to Sign- Returns:
- Object's Signature (or an empty string if the object was null)
-
getObjectBySignature
Get an Object by it's Signature- Type Parameters:
R
- Expected Object Type- Parameters:
signature
- Object's Signature- Returns:
- Object that is tied to this Signature (or null if the signature is unknown)
-
invalidateObjectSignature
Invalidate an Object Signature. This will remove the link between the Signature and the Object- Parameters:
signature
- Object's Signature
-
getRuntimeDirectory
Gets the Runtime Directory- Specified by:
getRuntimeDirectory
in interfaceBungeeAPI
- Returns:
- Directory
-
getWrapperVersion
Gets the SubServers Version- Specified by:
getWrapperVersion
in interfaceBungeeAPI
- Returns:
- SubServers Version
-
getWrapperBuild
Gets the SubServers Build Signature- Specified by:
getWrapperBuild
in interfaceBungeeAPI
- Returns:
- SubServers Build Signature (or null if unsigned)
-
getProxyVersion
Gets the BungeeCord Version- Specified by:
getProxyVersion
in interfaceBungeeAPI
- Returns:
- BungeeCord Version
-
getGameVersion
Get an array of compatible Minecraft Versions- Specified by:
getGameVersion
in interfaceBungeeAPI
- Returns:
- Minecraft Versions
-