Class ClientAPI
java.lang.Object
net.ME1312.SubServers.Client.Common.ClientAPI
- Direct Known Subclasses:
SubAPI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddServer(String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted) Adds a Server to the NetworkvoidaddServer(String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted, IntConsumer response) Adds a Server to the NetworkvoidaddServer(UUID player, String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted) Adds a Server to the NetworkvoidaddServer(UUID player, String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted, IntConsumer response) Adds a Server to the NetworkvoidforceRemoveServer(String name) Force Remove a Server from the NetworkvoidforceRemoveServer(String name, IntConsumer response) Force Remove a Server from the NetworkvoidforceRemoveServer(UUID player, String name) Force Remove a Server from the NetworkvoidforceRemoveServer(UUID player, String name, IntConsumer response) Force Remove a Server from the NetworkvoidGets a Server Group (Group names are case insensitive here)voidGets the Server Groups (Group names are case sensitive here)voidGets a HostvoidGets the Hostsstatic ClientAPIGets the SubAPI Client Common MethodsGets values from the SubServers LangGets a value from the SubServers Langabstract Collection<String>Gets the current SubServers Lang ChannelsvoidGets the Server Groups (Group names are all lowercase here)voidgetMasterProxy(Consumer<Proxy> callback) Get the Master Proxy Valueabstract StringgetName()Get the Server NamevoidgetProxies(Consumer<Map<String, Proxy>> callback) Gets the known ProxiesvoidGets a ProxyvoidgetRemotePlayer(String name, Consumer<RemotePlayer> callback) Gets a player on this network by searching across all known proxiesvoidgetRemotePlayer(UUID id, Consumer<RemotePlayer> callback) Gets a player on this network by searching across all known proxiesvoidgetRemotePlayers(Consumer<Map<UUID, RemotePlayer>> callback) Gets players on this network across all known proxiesvoidGets a ServervoidgetServers(Consumer<Map<String, Server>> callback) Gets the Servers (including SubServers)abstract DataClient[]Gets the SubData Network Connectionsabstract DataProtocolGets the SubData Network ProtocolvoidgetSubServer(String name, Consumer<SubServer> callback) Gets a SubServervoidgetSubServers(Consumer<Map<String, SubServer>> callback) Gets the SubServersvoidremoveServer(String name) Remove a Server from the NetworkvoidremoveServer(String name, IntConsumer response) Remove a Server from the NetworkvoidremoveServer(UUID player, String name) Remove a Server from the NetworkvoidremoveServer(UUID player, String name, IntConsumer response) Remove a Server from the Network
-
Constructor Details
-
ClientAPI
protected ClientAPI()
-
-
Method Details
-
getInstance
Gets the SubAPI Client Common Methods- Returns:
- SubAPI Client Common
-
getName
Get the Server Name- Returns:
- Server Name
-
getHosts
Gets the Hosts- Parameters:
callback- Host Map
-
getHost
Gets a Host- Parameters:
name- Host namecallback- a Host
-
getGroups
Gets the Server Groups (Group names are case sensitive here)- Parameters:
callback- Group Map
-
getLowercaseGroups
Gets the Server Groups (Group names are all lowercase here)- Parameters:
callback- Group Map
-
getGroup
Gets a Server Group (Group names are case insensitive here)- Parameters:
name- Group namecallback- a Server Group
-
getServers
Gets the Servers (including SubServers)- Parameters:
callback- Server Map
-
getServer
Gets a Server- Parameters:
name- Server namecallback- a Server
-
addServer
public void addServer(String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted, IntConsumer response) 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 trueresponse- Response Code
-
addServer
public void addServer(UUID player, String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted, IntConsumer response) 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 trueresponse- Response Code
-
addServer
public void 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
-
addServer
public void 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
-
removeServer
Remove a Server from the Network- Parameters:
name- Name of the Serverresponse- Response Code
-
removeServer
Remove a Server from the Network- Parameters:
player- Player Removingname- Name of the Serverresponse- Response Code
-
removeServer
Remove a Server from the Network- Parameters:
name- Name of the Server
-
removeServer
Remove a Server from the Network- Parameters:
player- Player Removingname- Name of the Server
-
forceRemoveServer
Force Remove a Server from the Network- Parameters:
name- Name of the Serverresponse- Response Code
-
forceRemoveServer
Force Remove a Server from the Network- Parameters:
player- Player Removingname- Name of the Serverresponse- Response Code
-
forceRemoveServer
Force Remove a Server from the Network- Parameters:
name- Name of the Server
-
forceRemoveServer
Force Remove a Server from the Network- Parameters:
player- Player Removingname- Name of the Server
-
getSubServers
Gets the SubServers- Parameters:
callback- SubServer Map
-
getSubServer
Gets a SubServer- Parameters:
name- SubServer namecallback- a SubServer
-
getProxies
Gets the known Proxies- Parameters:
callback- Proxy Map
-
getProxy
Gets a Proxy- Parameters:
name- Proxy namecallback- a Proxy
-
getMasterProxy
Get the Master Proxy Value- Parameters:
callback- Master Proxy
-
getRemotePlayers
Gets players on this network across all known proxies- Parameters:
callback- Remote Player Collection
-
getRemotePlayer
Gets a player on this network by searching across all known proxies- Parameters:
name- Player namecallback- Remote Player
-
getRemotePlayer
Gets a player on this network by searching across all known proxies- Parameters:
id- Player UUIDcallback- Remote Player
-
getSubDataNetwork
Gets the SubData Network Connections- Returns:
- SubData Network Connections
-
getSubDataProtocol
Gets the SubData Network Protocol- Returns:
- SubData Network Protocol
-
getLangChannels
Gets the current SubServers Lang Channels- Returns:
- SubServers Lang Channel list
-
getLang
Gets values from the SubServers Lang- Parameters:
channel- Lang Channel- Returns:
- Lang Value
-
getLang
Gets a value from the SubServers Lang- Parameters:
channel- Lang Channelkey- Key- Returns:
- Lang Values
-