Class Host
java.lang.Object
net.ME1312.SubServers.Client.Common.Network.API.Host
Simplified Host Data Class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSubServer
(String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted) Adds a SubServervoid
addSubServer
(String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted, IntConsumer response) Adds a SubServervoid
addSubServer
(UUID player, String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted) Adds a SubServervoid
addSubServer
(UUID player, String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted, IntConsumer response) Adds a SubServervoid
Commands the Servers Specifiedvoid
Commands the Servers Specifiedvoid
deleteSubServer
(String name) Deletes a SubServervoid
deleteSubServer
(String name, IntConsumer response) Deletes a SubServervoid
deleteSubServer
(UUID player, String name) Deletes a SubServervoid
deleteSubServer
(UUID player, String name, IntConsumer response) Deletes a SubServerboolean
void
forceDeleteSubServer
(String name) Forces the Deletion of a SubServervoid
forceDeleteSubServer
(String name, IntConsumer response) Forces the Deletion of a SubServervoid
forceDeleteSubServer
(UUID player, String name) Forces the Deletion of a SubServervoid
forceDeleteSubServer
(UUID player, String name, IntConsumer response) Forces the Deletion of a SubServervoid
forceRecycleSubServer
(String name) Forces the Deletion of a SubServer (will move to 'Recently Deleted')void
forceRecycleSubServer
(String name, IntConsumer response) Forces the Deletion of a SubServer (will move to 'Recently Deleted')void
forceRecycleSubServer
(UUID player, String name) Forces the Deletion of a SubServer (will move to 'Recently Deleted')void
forceRecycleSubServer
(UUID player, String name, IntConsumer response) Forces the Deletion of a SubServer (will move to 'Recently Deleted')void
forceRemoveSubServer
(String name) Forces the Removal of a SubServervoid
forceRemoveSubServer
(String name, IntConsumer response) Forces the Removal of a SubServervoid
forceRemoveSubServer
(UUID player, String name) Forces the Removal of a SubServervoid
forceRemoveSubServer
(UUID player, String name, IntConsumer response) Forces the Removal of a SubServerGet the Address of this HostGets the SubCreator Instance for this HostGet the Display Name of this HostgetExtra()
Get the extra value sectionGet an extra valuegetName()
Get the Name of this HostgetPath()
Get the host Directory PathgetRaw()
Get the raw representation of the HostGet players on servers provided by this host across all known proxiesvoid
getRemotePlayers
(Consumer<Collection<RemotePlayer>> callback) Get the players on servers provided by this host across all known proxiesfinal String
Get the Signature of this ObjectGets the SubData Client Channel IDsgetSubServer
(String name) Gets a SubServerGets the SubServers on this Hostlong
Get the Timestamp for when the data was last refreshedboolean
Determine if an extra value existsboolean
Is this Host Available?boolean
Is this Host Enabled?void
recycleSubServer
(String name) Deletes a SubServer (will move to 'Recently Deleted')void
recycleSubServer
(String name, IntConsumer response) Deletes a SubServer (will move to 'Recently Deleted')void
recycleSubServer
(UUID player, String name) Deletes a SubServer (will move to 'Recently Deleted')void
recycleSubServer
(UUID player, String name, IntConsumer response) Deletes a SubServer (will move to 'Recently Deleted')void
refresh()
Download a new copy of the data from SubDatavoid
removeSubServer
(String name) Removes a SubServervoid
removeSubServer
(String name, IntConsumer response) Removes a SubServervoid
removeSubServer
(UUID player, String name) Removes a SubServervoid
removeSubServer
(UUID player, String name, IntConsumer response) Removes a SubServervoid
Starts the Servers Specifiedvoid
Starts the Servers Specifiedvoid
Stops the Servers Specifiedvoid
Stops the Servers Specifiedvoid
Terminates the Servers Specifiedvoid
Terminates the Servers Specified
-
Constructor Details
-
Host
Create an API representation of a Host- Parameters:
raw
- Raw representation of the Host
-
-
Method Details
-
equals
-
refresh
public void refresh()Download a new copy of the data from SubData -
getSubData
Gets the SubData Client Channel IDs- Returns:
- SubData Client Channel ID Array (may be empty if unsupported)
-
isAvailable
public boolean isAvailable()Is this Host Available?- Returns:
- Availability Status
-
isEnabled
public boolean isEnabled()Is this Host Enabled?- Returns:
- Enabled Status
-
getAddress
Get the Address of this Host- Returns:
- Host Address
-
getPath
Get the host Directory Path- Returns:
- Host Directory Path
-
getName
Get the Name of this Host- Returns:
- Host Name
-
getDisplayName
Get the Display Name of this Host- Returns:
- Display Name
-
getRemotePlayers
Get players on servers provided by this host across all known proxies- Returns:
- Remote Player Collection
-
getRemotePlayers
Get the players on servers provided by this host across all known proxies- Parameters:
callback
- Remote Player Collection
-
start
Starts the Servers Specified- Parameters:
servers
- Servers
-
start
Starts the Servers Specified- Parameters:
player
- Player who startedservers
- Servers
-
stop
Stops the Servers Specified- Parameters:
servers
- Servers
-
stop
Stops the Servers Specified- Parameters:
player
- Player who startedservers
- Servers
-
terminate
Terminates the Servers Specified- Parameters:
servers
- Servers
-
terminate
Terminates the Servers Specified- Parameters:
player
- Player who startedservers
- Servers
-
command
Commands the Servers Specified- Parameters:
command
- Command to sendservers
- Servers
-
command
Commands the Servers Specified- Parameters:
player
- Player who startedcommand
- Command to sendservers
- Servers
-
getCreator
Gets the SubCreator Instance for this Host- Returns:
- SubCreator
-
getSubServers
Gets the SubServers on this Host- Returns:
- SubServer Map
-
getSubServer
Gets a SubServer- Parameters:
name
- SubServer Name- Returns:
- a SubServer
-
addSubServer
public void addSubServer(String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted, IntConsumer response) Adds a SubServer- Parameters:
name
- Name of Serverenabled
- Enabled Statusport
- Port Numbermotd
- Motd of the Serverlog
- Logging Statusdirectory
- Directoryexecutable
- Executable Stringstopcmd
- Command to Stop the Serverhidden
- if the server should be hidden from playersrestricted
- Players will need a permission to join if trueresponse
- Response Code
-
addSubServer
public void addSubServer(UUID player, String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted, IntConsumer response) Adds a SubServer- Parameters:
player
- Player addingname
- Name of Serverenabled
- Enabled Statusport
- Port Numbermotd
- Motd of the Serverlog
- Logging Statusdirectory
- Directoryexecutable
- Executable Stringstopcmd
- Command to Stop the Serverhidden
- if the server should be hidden from playersrestricted
- Players will need a permission to join if trueresponse
- Response Code
-
addSubServer
public void addSubServer(String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted) Adds a SubServer- Parameters:
name
- Name of Serverenabled
- Enabled Statusport
- Port Numbermotd
- Motd of the Serverlog
- Logging Statusdirectory
- Directoryexecutable
- Executable Stringstopcmd
- Command to Stop the Serverhidden
- if the server should be hidden from playersrestricted
- Players will need a permission to join if true
-
addSubServer
public void addSubServer(UUID player, String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted) Adds a SubServer- Parameters:
player
- Player addingname
- Name of Serverenabled
- Enabled Statusport
- Port Numbermotd
- Motd of the Serverlog
- Logging Statusdirectory
- Directoryexecutable
- Executable Stringstopcmd
- Command to Stop the Serverhidden
- if the server should be hidden from playersrestricted
- Players will need a permission to join if true
-
removeSubServer
Removes a SubServer- Parameters:
name
- SubServer Name
-
removeSubServer
Removes a SubServer- Parameters:
player
- Player Removingname
- SubServer Name
-
forceRemoveSubServer
Forces the Removal of a SubServer- Parameters:
name
- SubServer Name
-
forceRemoveSubServer
Forces the Removal of a SubServer- Parameters:
player
- Player Removingname
- SubServer Name
-
removeSubServer
Removes a SubServer- Parameters:
name
- SubServer Nameresponse
- Response Code
-
removeSubServer
Removes a SubServer- Parameters:
player
- Player Removingname
- SubServer Nameresponse
- Response Code
-
forceRemoveSubServer
Forces the Removal of a SubServer- Parameters:
name
- SubServer Nameresponse
- Response Code
-
forceRemoveSubServer
Forces the Removal of a SubServer- Parameters:
player
- Player Removingname
- SubServer Nameresponse
- Response Code
-
recycleSubServer
Deletes a SubServer (will move to 'Recently Deleted')- Parameters:
name
- SubServer Name
-
recycleSubServer
Deletes a SubServer (will move to 'Recently Deleted')- Parameters:
player
- Player Deletingname
- SubServer Name
-
forceRecycleSubServer
Forces the Deletion of a SubServer (will move to 'Recently Deleted')- Parameters:
name
- SubServer Name
-
forceRecycleSubServer
Forces the Deletion of a SubServer (will move to 'Recently Deleted')- Parameters:
player
- Player Deletingname
- SubServer Name
-
recycleSubServer
Deletes a SubServer (will move to 'Recently Deleted')- Parameters:
name
- SubServer Nameresponse
- Response Code
-
recycleSubServer
Deletes a SubServer (will move to 'Recently Deleted')- Parameters:
player
- Player Deletingname
- SubServer Nameresponse
- Response Code
-
forceRecycleSubServer
Forces the Deletion of a SubServer (will move to 'Recently Deleted')- Parameters:
name
- SubServer Nameresponse
- Response Code
-
forceRecycleSubServer
Forces the Deletion of a SubServer (will move to 'Recently Deleted')- Parameters:
player
- Player Deletingname
- SubServer Nameresponse
- Response Code
-
deleteSubServer
Deletes a SubServer- Parameters:
name
- SubServer Name
-
deleteSubServer
Deletes a SubServer- Parameters:
player
- Player Deletingname
- SubServer Name
-
forceDeleteSubServer
Forces the Deletion of a SubServer- Parameters:
name
- SubServer Name
-
forceDeleteSubServer
Forces the Deletion of a SubServer- Parameters:
player
- Player Deletingname
- SubServer Name
-
deleteSubServer
Deletes a SubServer- Parameters:
name
- SubServer Name
-
deleteSubServer
Deletes a SubServer- Parameters:
player
- Player Deletingname
- SubServer Name
-
forceDeleteSubServer
Forces the Deletion of a SubServer- Parameters:
name
- SubServer Name
-
forceDeleteSubServer
Forces the Deletion of a SubServer- Parameters:
player
- Player Deletingname
- SubServer Name
-
getSignature
Get the Signature of this Object- Returns:
- Object Signature
-
getTimestamp
public long getTimestamp()Get the Timestamp for when the data was last refreshed- Returns:
- Data Timestamp
-
hasExtra
Determine if an extra value exists- Parameters:
handle
- Handle- Returns:
- Value Status
-
getExtra
Get an extra value- Parameters:
handle
- Handle- Returns:
- Value
-
getExtra
Get the extra value section- Returns:
- Extra Value Section
-
getRaw
Get the raw representation of the Host- Returns:
- Raw Host
-