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
|
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 |
getDirectory()
Get the Directory of this Host
|
java.lang.String |
getName()
Get the Name of this Host
|
Client |
getSubDataClient()
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?
|
void |
linkSubDataClient(Client client)
Link a SubData Client to this Object
|
boolean |
removeSubServer(java.util.UUID player,
java.lang.String name)
Removes a SubServer
|
void |
setEnabled(boolean value)
Set if this Host is Enabled
|
addExtra, addSubServer, command, command, deleteSubServer, 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 getSubDataClient()
ClientHandler
getSubDataClient
in interface ClientHandler
public void linkSubDataClient(Client client)
ClientHandler
linkSubDataClient
in interface ClientHandler
client
- Client to Linkpublic 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 getDirectory()
Host
getDirectory
in class Host
public java.lang.String getName()
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