Class InternalHost
java.lang.Object
net.ME1312.SubServers.Bungee.Host.Host
net.ME1312.SubServers.Bungee.Host.Internal.InternalHost
- All Implemented Interfaces:
ExtraDataHandler<String>
Internal Host Class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionInternalHost
(SubProxy plugin, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) Creates an Internal Host -
Method Summary
Modifier and TypeMethodDescriptionboolean
addSubServer
(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 boolean
deleteSubServer
(UUID player, String name, boolean forced) Deletes a SubServerprotected boolean
deleteSubServer
(UUID player, String name, boolean forced, boolean multithreading) Deletes a SubServerGet 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 Hostboolean
Is this Host Enabled?protected boolean
recycleSubServer
(UUID player, String name, boolean forced) Deletes a SubServer (will move to 'Recently Deleted')protected boolean
recycleSubServer
(UUID player, String name, boolean forced, boolean multithreading) Deletes a SubServer (will move to 'Recently Deleted')protected boolean
removeSubServer
(UUID player, String name, boolean forced) Removes a SubServervoid
setEnabled
(boolean value) Set if this Host is EnabledMethods inherited from class net.ME1312.SubServers.Bungee.Host.Host
addExtra, addSubServer, addSubServer, addSubServer, command, command, deleteSubServer, deleteSubServer, destroy, equals, forceDeleteSubServer, forceDeleteSubServer, forceRecycleSubServer, forceRecycleSubServer, forceRemoveSubServer, forceRemoveSubServer, forSubData, getDisplayName, getExtra, getExtra, getPlayers, getRemotePlayers, getSignature, hasExtra, isAvailable, recycleSubServer, recycleSubServer, removeExtra, removeSubServer, removeSubServer, setDisplayName, start, start, stop, stop, terminate, terminate
-
Field Details
-
DRM_ALLOW
public static final boolean DRM_ALLOW
-
-
Constructor Details
-
InternalHost
public InternalHost(SubProxy plugin, String name, boolean enabled, com.google.common.collect.Range<Integer> ports, boolean log, InetAddress address, String directory, String gitBash) Creates an Internal 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
-
isEnabled
public boolean isEnabled()Description copied from class:Host
Is this Host Enabled? -
setEnabled
public void setEnabled(boolean value) Description copied from class:Host
Set if this Host is Enabled- Specified by:
setEnabled
in classHost
- Parameters:
value
- Value
-
getAddress
Description copied from class:Host
Get the Address of this Host- Specified by:
getAddress
in classHost
- Returns:
- Host Address
-
getPath
Description copied from class:Host
Get the host Directory Path -
getName
Description copied from class:Host
Get the Name of this Host -
getCreator
Description copied from class:Host
Gets the SubCreator Instance for this Host- Specified by:
getCreator
in classHost
- Returns:
- SubCreator
-
getSubServers
Description copied from class:Host
Gets the SubServers on this Host- Specified by:
getSubServers
in classHost
- Returns:
- SubServer Map
-
getSubServer
Description copied from class:Host
Gets a SubServer- Specified by:
getSubServer
in 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:Host
Constructs a SubServer (but doesn't add it to the server manager)- Specified by:
constructSubServer
in 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:Host
Adds a SubServer- Specified by:
addSubServer
in 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:Host
Removes a SubServer- Specified by:
removeSubServer
in 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:Host
Deletes a SubServer (will move to 'Recently Deleted')- Specified by:
recycleSubServer
in classHost
- Parameters:
player
- Player Deletingname
- SubServer Nameforced
- Forces the Deletion- Returns:
- Success Status
- Throws:
InterruptedException
-
recycleSubServer
protected boolean recycleSubServer(UUID player, String name, boolean forced, boolean multithreading) throws InterruptedException Deletes a SubServer (will move to 'Recently Deleted')- Parameters:
player
- Player Deletingname
- SubServer Nameforced
- Forces the Deletionmultithreading
- Uses Multithreading for I/O- Returns:
- Success Status
- Throws:
InterruptedException
-
deleteSubServer
protected boolean deleteSubServer(UUID player, String name, boolean forced) throws InterruptedException Description copied from class:Host
Deletes a SubServer- Specified by:
deleteSubServer
in 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, boolean multithreading) throws InterruptedException Deletes a SubServer- Parameters:
player
- Player Deletingname
- SubServer Nameforced
- Forces the Deletionmultithreading
- Uses Multithreading for I/O- Returns:
- Success Status
- Throws:
InterruptedException
-