Class ClientAPI
java.lang.Object
net.ME1312.SubServers.Client.Common.ClientAPI
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addServer
(String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted) Adds a Server to the Networkvoid
addServer
(String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted, IntConsumer response) Adds a Server to the Networkvoid
addServer
(UUID player, String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted) Adds a Server to the Networkvoid
addServer
(UUID player, String name, InetAddress ip, int port, String motd, boolean hidden, boolean restricted, IntConsumer response) Adds a Server to the Networkvoid
forceRemoveServer
(String name) Force Remove a Server from the Networkvoid
forceRemoveServer
(String name, IntConsumer response) Force Remove a Server from the Networkvoid
forceRemoveServer
(UUID player, String name) Force Remove a Server from the Networkvoid
forceRemoveServer
(UUID player, String name, IntConsumer response) Force Remove a Server from the Networkvoid
Gets a Server Group (Group names are case insensitive here)void
Gets the Server Groups (Group names are case sensitive here)void
Gets a Hostvoid
Gets the Hostsstatic ClientAPI
Gets the SubAPI Client Common MethodsGets values from the SubServers LangGets a value from the SubServers Langabstract Collection<String>
Gets the current SubServers Lang Channelsvoid
Gets the Server Groups (Group names are all lowercase here)void
getMasterProxy
(Consumer<Proxy> callback) Get the Master Proxy Valueabstract String
getName()
Get the Server Namevoid
getProxies
(Consumer<Map<String, Proxy>> callback) Gets the known Proxiesvoid
Gets a Proxyvoid
getRemotePlayer
(String name, Consumer<RemotePlayer> callback) Gets a player on this network by searching across all known proxiesvoid
getRemotePlayer
(UUID id, Consumer<RemotePlayer> callback) Gets a player on this network by searching across all known proxiesvoid
getRemotePlayers
(Consumer<Map<UUID, RemotePlayer>> callback) Gets players on this network across all known proxiesvoid
Gets a Servervoid
getServers
(Consumer<Map<String, Server>> callback) Gets the Servers (including SubServers)abstract DataClient[]
Gets the SubData Network Connectionsabstract DataProtocol
Gets the SubData Network Protocolvoid
getSubServer
(String name, Consumer<SubServer> callback) Gets a SubServervoid
getSubServers
(Consumer<Map<String, SubServer>> callback) Gets the SubServersvoid
removeServer
(String name) Remove a Server from the Networkvoid
removeServer
(String name, IntConsumer response) Remove a Server from the Networkvoid
removeServer
(UUID player, String name) Remove a Server from the Networkvoid
removeServer
(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
-