public class ExternalHost extends Host implements ClientHandler
Constructor and Description |
---|
ExternalHost(SubPlugin plugin,
java.lang.String name,
java.lang.Boolean enabled,
java.net.InetAddress address,
java.lang.String directory,
java.lang.String gitBash)
Creates an External Host
|
Modifier and Type | Method and Description |
---|---|
SubServer |
addSubServer(java.util.UUID player,
java.lang.String name,
boolean enabled,
int port,
java.lang.String motd,
boolean log,
java.lang.String directory,
Executable executable,
java.lang.String stopcmd,
boolean start,
boolean restart,
boolean hidden,
boolean restricted,
boolean temporary)
Adds a SubServer
|
boolean |
deleteSubServer(java.util.UUID player,
java.lang.String name)
Delete a SubServer
|
int |
edit(java.util.UUID player,
YAMLSection edit)
Edits the Host
|
boolean |
forceDeleteSubServer(java.util.UUID player,
java.lang.String name)
Forces the Deletion of a SubServer
|
boolean |
forceRemoveSubServer(java.util.UUID player,
java.lang.String name)
Forces the Removal of a SubServer
|
java.net.InetAddress |
getAddress()
Get the Address of this Host
|
SubCreator |
getCreator()
Gets the SubCreator Instance for this Host
|
java.lang.String |
getName()
Get the Name of this Host
|
java.lang.String |
getPath()
Get the host Directory Path
|
Client |
getSubData()
Gets the SubData Client
|
SubServer |
getSubServer(java.lang.String name)
Gets a SubServer
|
java.util.Map<java.lang.String,? extends SubServer> |
getSubServers()
Gets the SubServers on this Host
|
boolean |
isEnabled()
Is this Host Enabled?
|
boolean |
removeSubServer(java.util.UUID player,
java.lang.String name)
Removes a SubServer
|
void |
setEnabled(boolean value)
Set if this Host is Enabled
|
void |
setSubData(Client client)
Link a SubData Client to this Object
|
addExtra, addSubServer, command, command, deleteSubServer, edit, forceDeleteSubServer, forceRemoveSubServer, getDisplayName, getExtra, getExtra, hasExtra, removeExtra, removeSubServer, setDisplayName, start, start, stop, stop, terminate, terminate
public ExternalHost(SubPlugin plugin, java.lang.String name, java.lang.Boolean enabled, java.net.InetAddress address, java.lang.String directory, java.lang.String gitBash)
plugin
- Pluginname
- Nameenabled
- Enabled Statusaddress
- Addressdirectory
- DirectorygitBash
- Git Bash Locationpublic Client getSubData()
ClientHandler
getSubData
in interface ClientHandler
public void setSubData(Client client)
ClientHandler
setSubData
in interface ClientHandler
client
- Client to LinkClient.setHandler(ClientHandler)
public boolean isEnabled()
Host
public void setEnabled(boolean value)
Host
setEnabled
in class Host
value
- Valuepublic java.net.InetAddress getAddress()
Host
getAddress
in class Host
public java.lang.String getPath()
Host
public java.lang.String getName()
Host
public int edit(java.util.UUID player, YAMLSection edit)
Host
public SubCreator getCreator()
Host
getCreator
in class Host
public java.util.Map<java.lang.String,? extends SubServer> getSubServers()
Host
getSubServers
in class Host
public SubServer getSubServer(java.lang.String name)
Host
getSubServer
in class Host
name
- SubServer Namepublic SubServer addSubServer(java.util.UUID player, java.lang.String name, boolean enabled, int port, java.lang.String motd, boolean log, java.lang.String directory, Executable executable, java.lang.String stopcmd, boolean start, boolean restart, boolean hidden, boolean restricted, boolean temporary) throws InvalidServerException
Host
addSubServer
in class Host
player
- Player who Addedname
- Name of Serverenabled
- Enabled Statusport
- Port Numbermotd
- Motd of the Serverlog
- Logging Statusdirectory
- Directoryexecutable
- Executablestopcmd
- Command to Stop the Serverrestart
- Auto Restart Statushidden
- if the server should be hidden from playersrestricted
- Players will need a permission to join if truetemporary
- Temporary StatusInvalidServerException
public boolean removeSubServer(java.util.UUID player, java.lang.String name) throws java.lang.InterruptedException
Host
removeSubServer
in class Host
player
- Player Removingname
- SubServer Namejava.lang.InterruptedException
public boolean forceRemoveSubServer(java.util.UUID player, java.lang.String name)
Host
forceRemoveSubServer
in class Host
player
- Player Removingname
- SubServer Namepublic boolean deleteSubServer(java.util.UUID player, java.lang.String name) throws java.lang.InterruptedException
Host
deleteSubServer
in class Host
player
- Player Deletingname
- SubServer Namejava.lang.InterruptedException
public boolean forceDeleteSubServer(java.util.UUID player, java.lang.String name) throws java.lang.InterruptedException
Host
forceDeleteSubServer
in class Host
player
- Player Deletingname
- SubServer Namejava.lang.InterruptedException