Class ExternalHost
java.lang.Object
net.ME1312.SubServers.Bungee.Host.Host
net.ME1312.SubServers.Bungee.Host.External.ExternalHost
- All Implemented Interfaces:
ExtraDataHandler<String>,ClientHandler,SubDataSerializable
External Host Class
-
Constructor Summary
ConstructorsConstructorDescriptionExternalHost(SubProxy plugin, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) Creates an External Host -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddSubServer(UUID player, SubServer server) Adds a SubServerconstructSubServer(String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted) Constructs a SubServer (but doesn't add it to the server manager)protected booleandeleteSubServer(UUID player, String name, boolean forced) Deletes a SubServerbooleandestroy()Resets this Host objectGet the Address of this HostGets the SubCreator Instance for this HostgetName()Get the Name of this HostgetPath()Get the host Directory PathgetSubServer(String name) Gets a SubServerGets the SubServers on this HostbooleanIs this Host Available?booleanIs this Host Enabled?protected booleanrecycleSubServer(UUID player, String name, boolean forced) Deletes a SubServer (will move to 'Recently Deleted')voidremoveSubData(DataClient client) protected booleanremoveSubServer(UUID player, String name, boolean forced) Removes a SubServervoidsetEnabled(boolean value) Set if this Host is EnabledvoidsetSubData(DataClient client, int channel) Methods inherited from class net.ME1312.SubServers.Bungee.Host.Host
addExtra, addSubServer, addSubServer, addSubServer, command, command, deleteSubServer, deleteSubServer, equals, forceDeleteSubServer, forceDeleteSubServer, forceRecycleSubServer, forceRecycleSubServer, forceRemoveSubServer, forceRemoveSubServer, getDisplayName, getExtra, getExtra, getPlayers, getRemotePlayers, getSignature, hasExtra, recycleSubServer, recycleSubServer, removeExtra, removeSubServer, removeSubServer, setDisplayName, start, start, stop, stop, terminate, terminate
-
Constructor Details
-
ExternalHost
public ExternalHost(SubProxy plugin, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) Creates an External Host- Parameters:
plugin- SubServers Internalsname- 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
-
-
Method Details
-
getSubData
- Specified by:
getSubDatain interfaceClientHandler
-
setSubData
-
removeSubData
- Specified by:
removeSubDatain interfaceClientHandler
-
isAvailable
public boolean isAvailable()Description copied from class:HostIs this Host Available?- Overrides:
isAvailablein classHost- Returns:
- Availability Status
-
isEnabled
public boolean isEnabled()Description copied from class:HostIs this Host Enabled? -
setEnabled
public void setEnabled(boolean value) Description copied from class:HostSet if this Host is Enabled- Specified by:
setEnabledin classHost- Parameters:
value- Value
-
getAddress
Description copied from class:HostGet the Address of this Host- Specified by:
getAddressin classHost- Returns:
- Host Address
-
getPath
Description copied from class:HostGet the host Directory Path -
getName
Description copied from class:HostGet the Name of this Host -
getCreator
Description copied from class:HostGets the SubCreator Instance for this Host- Specified by:
getCreatorin classHost- Returns:
- SubCreator
-
getSubServers
Description copied from class:HostGets the SubServers on this Host- Specified by:
getSubServersin classHost- Returns:
- SubServer Map
-
getSubServer
Description copied from class:HostGets a SubServer- Specified by:
getSubServerin classHost- Parameters:
name- SubServer Name- Returns:
- a SubServer
-
constructSubServer
public SubServer constructSubServer(String name, boolean enabled, int port, String motd, boolean log, String directory, String executable, String stopcmd, boolean hidden, boolean restricted) throws InvalidServerException Description copied from class:HostConstructs a SubServer (but doesn't add it to the server manager)- Specified by:
constructSubServerin classHost- 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- Returns:
- The SubServer
- Throws:
InvalidServerException
-
addSubServer
Description copied from class:HostAdds a SubServer- Specified by:
addSubServerin classHost- Parameters:
player- Player who addedserver- SubServer to add- Returns:
- Success status
- Throws:
InvalidServerException
-
removeSubServer
protected boolean removeSubServer(UUID player, String name, boolean forced) throws InterruptedException Description copied from class:HostRemoves a SubServer- Specified by:
removeSubServerin classHost- Parameters:
player- Player Removingname- SubServer Nameforced- Forces the Removal- Returns:
- Success Status
- Throws:
InterruptedException
-
recycleSubServer
protected boolean recycleSubServer(UUID player, String name, boolean forced) throws InterruptedException Description copied from class:HostDeletes a SubServer (will move to 'Recently Deleted')- Specified by:
recycleSubServerin classHost- Parameters:
player- Player Deletingname- SubServer Nameforced- Forces the Deletion- Returns:
- Success Status
- Throws:
InterruptedException
-
deleteSubServer
protected boolean deleteSubServer(UUID player, String name, boolean forced) throws InterruptedException Description copied from class:HostDeletes a SubServer- Specified by:
deleteSubServerin classHost- Parameters:
player- Player Deletingname- SubServer Nameforced- Forces the Deletion- Returns:
- Success Status
- Throws:
InterruptedException
-
destroy
public boolean destroy()Description copied from class:HostResets this Host object -
forSubData
- Specified by:
forSubDatain interfaceClientHandler- Specified by:
forSubDatain interfaceSubDataSerializable- Overrides:
forSubDatain classHost
-