Class InternalSubCreator
java.lang.Object
net.ME1312.SubServers.Bungee.Host.SubCreator
net.ME1312.SubServers.Bungee.Host.Internal.InternalSubCreator
Internal SubCreator Class
-
Nested Class Summary
Nested classes/interfaces inherited from class net.ME1312.SubServers.Bungee.Host.SubCreator
SubCreator.ServerTemplate, SubCreator.ServerType
-
Constructor Summary
ConstructorDescriptionInternalSubCreator
(InternalHost host, com.google.common.collect.Range<Integer> ports, boolean log, String gitBash) Creates an Internal SubCreator -
Method Summary
Modifier and TypeMethodDescriptionboolean
create
(UUID player, String name, SubCreator.ServerTemplate template, Version version, Integer port, Consumer<SubServer> callback) Create a SubServerGets the Git Bash install directorygetHost()
Gets the host this creator belongs toGets the Logger for a SubCreator InstanceGets all loggers for All SubCreator Instancescom.google.common.collect.Range
Get the range of available port numbersGet a list of currently reserved Server namesGet a list of currently reserved Server portsgetTemplate
(String name) Gets a SubCreator Template by nameGets the Templates that can be used in this SubCreator instanceboolean
If the Creator is Logging to consolevoid
reload()
Reload SubCreatorvoid
setLogging
(boolean value) Set if the Creator is Loggingvoid
setPortRange
(com.google.common.collect.Range<Integer> value) Get the range of available port numbersvoid
Terminate All SubCreator Instances on this hostvoid
Terminate a SubCreator Instanceboolean
update
(UUID player, SubServer server, SubCreator.ServerTemplate template, Version version, Consumer<Boolean> callback) Update a SubServervoid
waitFor()
Wait for All SubCreator Instances to Finishvoid
Wait for SubCreator to FinishMethods inherited from class net.ME1312.SubServers.Bungee.Host.SubCreator
create, create, create, equals, getAllReservedAddresses, getAllReservedNames, isReserved, isReserved, loadTemplate, update, update, update, update, update
-
Constructor Details
-
InternalSubCreator
public InternalSubCreator(InternalHost host, com.google.common.collect.Range<Integer> ports, boolean log, String gitBash) Creates an Internal SubCreator- Parameters:
host
- Hostports
- The range of ports to auto-select fromlog
- Whether SubCreator should log to consolegitBash
- The Git Bash directory
-
-
Method Details
-
reload
public void reload()Description copied from class:SubCreator
Reload SubCreator- Specified by:
reload
in classSubCreator
-
create
public boolean create(UUID player, String name, SubCreator.ServerTemplate template, Version version, Integer port, Consumer<SubServer> callback) Description copied from class:SubCreator
Create a SubServer- Specified by:
create
in classSubCreator
- Parameters:
player
- Player Creatingname
- Server Nametemplate
- Server Templateversion
- Server Version (may be null)port
- Server Port Number (null to auto-select)callback
- Callback- Returns:
- Success Status
-
update
public boolean update(UUID player, SubServer server, SubCreator.ServerTemplate template, Version version, Consumer<Boolean> callback) Description copied from class:SubCreator
Update a SubServer- Specified by:
update
in classSubCreator
- Parameters:
player
- Player Updatingserver
- Server to Updatetemplate
- Server Templateversion
- Server Version (may be null)callback
- Callback- Returns:
- Success Status
-
terminate
public void terminate()Description copied from class:SubCreator
Terminate All SubCreator Instances on this host- Specified by:
terminate
in classSubCreator
-
terminate
Description copied from class:SubCreator
Terminate a SubCreator Instance- Specified by:
terminate
in classSubCreator
- Parameters:
name
- Name of current creating server
-
waitFor
Description copied from class:SubCreator
Wait for All SubCreator Instances to Finish- Specified by:
waitFor
in classSubCreator
- Throws:
InterruptedException
-
waitFor
Description copied from class:SubCreator
Wait for SubCreator to Finish- Specified by:
waitFor
in classSubCreator
- Parameters:
name
- Name of current creating server- Throws:
InterruptedException
-
getHost
Description copied from class:SubCreator
Gets the host this creator belongs to- Specified by:
getHost
in classSubCreator
- Returns:
- Host
-
getPortRange
public com.google.common.collect.Range getPortRange()Description copied from class:SubCreator
Get the range of available port numbers- Specified by:
getPortRange
in classSubCreator
- Returns:
- Port Range
-
setPortRange
Description copied from class:SubCreator
Get the range of available port numbers- Specified by:
setPortRange
in classSubCreator
- Parameters:
value
- Value
-
getBashDirectory
Description copied from class:SubCreator
Gets the Git Bash install directory- Specified by:
getBashDirectory
in classSubCreator
- Returns:
- Git Bash Directory
-
getLoggers
Description copied from class:SubCreator
Gets all loggers for All SubCreator Instances- Specified by:
getLoggers
in classSubCreator
- Returns:
- SubCreator Loggers
-
getLogger
Description copied from class:SubCreator
Gets the Logger for a SubCreator Instance- Specified by:
getLogger
in classSubCreator
- Parameters:
name
- Thread ID- Returns:
- SubCreator Logger
-
isLogging
public boolean isLogging()Description copied from class:SubCreator
If the Creator is Logging to console- Specified by:
isLogging
in classSubCreator
- Returns:
- Logging Status
-
setLogging
public void setLogging(boolean value) Description copied from class:SubCreator
Set if the Creator is Logging- Specified by:
setLogging
in classSubCreator
- Parameters:
value
- Value
-
getReservedNames
Description copied from class:SubCreator
Get a list of currently reserved Server names- Specified by:
getReservedNames
in classSubCreator
- Returns:
- Reserved Names
-
getReservedPorts
Description copied from class:SubCreator
Get a list of currently reserved Server ports- Specified by:
getReservedPorts
in classSubCreator
- Returns:
- Reserved Ports
-
getTemplates
Description copied from class:SubCreator
Gets the Templates that can be used in this SubCreator instance- Specified by:
getTemplates
in classSubCreator
- Returns:
- Template Map
-
getTemplate
Description copied from class:SubCreator
Gets a SubCreator Template by name- Specified by:
getTemplate
in classSubCreator
- Parameters:
name
- Template Name- Returns:
- Template
-