public class InternalHost extends Host
Constructor and Description |
---|
InternalHost(SubPlugin plugin,
java.lang.String name,
java.lang.Boolean enabled,
java.net.InetAddress address,
java.lang.String directory,
java.lang.String gitBash)
Creates an Internal 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
|
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
|
addExtra, addSubServer, command, command, deleteSubServer, forceRemoveSubServer, getDisplayName, getExtra, getExtra, hasExtra, removeExtra, removeSubServer, setDisplayName, start, start, stop, stop, terminate, terminate
public InternalHost(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 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