Class SubCreator
java.lang.Object
net.ME1312.SubServers.Bungee.Host.SubCreator
- Direct Known Subclasses:
ExternalSubCreator
,InternalSubCreator
SubCreator Layout Class
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
create
(String name, SubCreator.ServerTemplate template, Version version, Integer port) Create a SubServerboolean
create
(String name, SubCreator.ServerTemplate template, Version version, Integer port, Consumer<SubServer> callback) Create a SubServerboolean
Create a SubServerabstract boolean
create
(UUID player, String name, SubCreator.ServerTemplate template, Version version, Integer port, Consumer<SubServer> callback) Create a SubServerboolean
static List<InetSocketAddress>
Get a list of all currently reserved Server names across all hostsGet a list of all currently reserved Server names across all hostsabstract String
Gets the Git Bash install directoryabstract Host
getHost()
Gets the host this creator belongs toabstract SubLogger
Gets the Logger for a SubCreator InstanceGets all loggers for All SubCreator Instancesabstract com.google.common.collect.Range
Get the range of available port numbersGet a list of currently reserved Server namesGet a list of currently reserved Server portsabstract SubCreator.ServerTemplate
getTemplate
(String name) Gets a SubCreator Template by nameabstract Map<String,
SubCreator.ServerTemplate> Gets the Templates that can be used in this SubCreator instanceabstract boolean
If the Creator is Logging to consolestatic boolean
isReserved
(String name) Check if a name has been reservedstatic boolean
isReserved
(InetSocketAddress address) Check if an address has been reservedprotected SubCreator.ServerTemplate
loadTemplate
(String name, boolean enabled, boolean internal, String icon, File directory, ObjectMap<String> build, ObjectMap<String> options) Create a SubCreator Templateabstract void
reload()
Reload SubCreatorabstract void
setLogging
(boolean value) Set if the Creator is Loggingabstract void
setPortRange
(com.google.common.collect.Range<Integer> value) Get the range of available port numbersabstract void
Terminate All SubCreator Instances on this hostabstract void
Terminate a SubCreator Instanceboolean
Update a SubServerboolean
update
(UUID player, SubServer server, SubCreator.ServerTemplate template, Version version) Update a SubServerabstract boolean
update
(UUID player, SubServer server, SubCreator.ServerTemplate template, Version version, Consumer<Boolean> callback) Update a SubServerboolean
Update a SubServerboolean
update
(SubServer server, SubCreator.ServerTemplate template, Version version) Update a SubServerboolean
update
(SubServer server, SubCreator.ServerTemplate template, Version version, Consumer<Boolean> callback) Update a SubServerabstract void
waitFor()
Wait for All SubCreator Instances to Finishabstract void
Wait for SubCreator to Finish
-
Constructor Details
-
SubCreator
public SubCreator()
-
-
Method Details
-
create
public abstract boolean create(UUID player, String name, SubCreator.ServerTemplate template, Version version, Integer port, Consumer<SubServer> callback) Create a SubServer- 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
-
create
public boolean create(UUID player, String name, SubCreator.ServerTemplate template, Version version, Integer port) Create a SubServer- Parameters:
player
- Player Creatingname
- Server Nametemplate
- Server Templateversion
- Server Version (may be null)port
- Server Port Number (null to auto-select)- Returns:
- Success Status
-
create
public boolean create(String name, SubCreator.ServerTemplate template, Version version, Integer port, Consumer<SubServer> callback) Create a SubServer- Parameters:
name
- Server Nametemplate
- Server Templateversion
- Server Version (may be null)port
- Server Port Number (null to auto-select)callback
- Callback- Returns:
- Success Status
-
create
public boolean create(String name, SubCreator.ServerTemplate template, Version version, Integer port) Create a SubServer- Parameters:
name
- Server Nametemplate
- Server Templateversion
- Server Version (may be null)port
- Server Port Number (null to auto-select)- Returns:
- Success Status
-
update
public abstract boolean update(UUID player, SubServer server, SubCreator.ServerTemplate template, Version version, Consumer<Boolean> callback) Update a SubServer- Parameters:
player
- Player Updatingserver
- Server to Updatetemplate
- Server Templateversion
- Server Version (may be null)callback
- Callback- Returns:
- Success Status
-
update
public boolean update(UUID player, SubServer server, SubCreator.ServerTemplate template, Version version) Update a SubServer- Parameters:
player
- Player Updatingserver
- Server to Updatetemplate
- Server Templateversion
- Server Version (may be null)- Returns:
- Success Status
-
update
public boolean update(SubServer server, SubCreator.ServerTemplate template, Version version, Consumer<Boolean> callback) Update a SubServer- Parameters:
server
- Server to Updatetemplate
- Server Templateversion
- Server Version (may be null)callback
- Callback- Returns:
- Success Status
-
update
Update a SubServer- Parameters:
server
- Server to Updatetemplate
- Server Templateversion
- Server Version (may be null)- Returns:
- Success Status
-
update
Update a SubServer- Parameters:
player
- Player Updatingserver
- Server to Updateversion
- Server Version (may be null)- Returns:
- Success Status
-
update
Update a SubServer- Parameters:
server
- Server to Updateversion
- Server Version (may be null)- Returns:
- Success Status
-
terminate
public abstract void terminate()Terminate All SubCreator Instances on this host -
terminate
Terminate a SubCreator Instance- Parameters:
name
- Name of current creating server
-
waitFor
Wait for All SubCreator Instances to Finish- Throws:
InterruptedException
-
waitFor
Wait for SubCreator to Finish- Parameters:
name
- Name of current creating server- Throws:
InterruptedException
-
getHost
Gets the host this creator belongs to- Returns:
- Host
-
getPortRange
public abstract com.google.common.collect.Range getPortRange()Get the range of available port numbers- Returns:
- Port Range
-
setPortRange
Get the range of available port numbers- Parameters:
value
- Value
-
getBashDirectory
Gets the Git Bash install directory- Returns:
- Git Bash Directory
-
getLoggers
Gets all loggers for All SubCreator Instances- Returns:
- SubCreator Loggers
-
getLogger
Gets the Logger for a SubCreator Instance- Parameters:
thread
- Thread ID- Returns:
- SubCreator Logger
-
isLogging
public abstract boolean isLogging()If the Creator is Logging to console- Returns:
- Logging Status
-
setLogging
public abstract void setLogging(boolean value) Set if the Creator is Logging- Parameters:
value
- Value
-
getReservedNames
Get a list of currently reserved Server names- Returns:
- Reserved Names
-
getReservedPorts
Get a list of currently reserved Server ports- Returns:
- Reserved Ports
-
isReserved
Check if a name has been reserved- Parameters:
name
- Name to check- Returns:
- Reserved Status
-
isReserved
Check if an address has been reserved- Parameters:
address
- Address to check- Returns:
- Reserved Status
-
getAllReservedNames
Get a list of all currently reserved Server names across all hosts- Returns:
- All Reserved Names
-
getAllReservedAddresses
Get a list of all currently reserved Server names across all hosts- Returns:
- All Reserved Names
-
getTemplates
Gets the Templates that can be used in this SubCreator instance- Returns:
- Template Map
-
getTemplate
Gets a SubCreator Template by name- Parameters:
name
- Template Name- Returns:
- Template
-
loadTemplate
protected SubCreator.ServerTemplate loadTemplate(String name, boolean enabled, boolean internal, String icon, File directory, ObjectMap<String> build, ObjectMap<String> options) Create a SubCreator Template- Parameters:
name
- Template Nameenabled
- Template Enabled Statusinternal
- Template Internal Statusicon
- Template Item Icon Namedirectory
- Template Directorybuild
- Build Optionsoptions
- Configuration Options
-
reload
public abstract void reload()Reload SubCreator -
equals
-