# SubCreator (SubServers.Bungee)

net.ME1312.SubServers.Bungee.Host

## Class SubCreator

- java.lang.Object
- - net.ME1312.SubServers.Bungee.Host.SubCreator

Direct Known Subclasses:
  ExternalSubCreator, InternalSubCreator

    public abstract class SubCreator
    extends java.lang.Object

SubCreator Layout Class

### Nested Class Summary

Nested Classes
`static class` `SubCreator.ServerTemplate`
`static class` `SubCreator.ServerType`

### Constructor Summary

Constructors
Constructor and Description
`SubCreator()`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`boolean` `create(java.lang.String name, SubCreator.ServerTemplate template, Version version, int port)` Create a SubServer
`abstract boolean` `create(java.util.UUID player, java.lang.String name, SubCreator.ServerTemplate template, Version version, int port)` Create a SubServer
`static java.util.Map<Host,java.util.List<java.lang.String>>` `getAllReservedNames()` Get a list of all currently reserved Server names across all hosts
`abstract java.lang.String` `getBashDirectory()` Gets the Git Bash install directory
`abstract Host` `getHost()` Gets the host this creator belongs to
`abstract java.util.List<SubLogger>` `getLogger()` Gets all loggers for All SubCreator Instances
`abstract SubLogger` `getLogger(java.lang.String thread)` Gets the Logger for a SubCreator Instance
`abstract java.util.List<java.lang.String>` `getReservedNames()` Get a list of currently reserved Server names
`abstract SubCreator.ServerTemplate` `getTemplate(java.lang.String name)` Gets a SubCreator Template by name
`abstract java.util.Map<java.lang.String,SubCreator.ServerTemplate>` `getTemplates()` Gets the Templates that can be used in this SubCreator instance
`static boolean` `isReserved(java.lang.String name)` Check if a name has been reserved
`abstract void` `reload()` Reload SubCreator
`abstract void` `terminate()` Terminate All SubCreator Instances on this host
`abstract void` `terminate(java.lang.String name)` Terminate a SubCreator Instance
`abstract void` `waitFor()` Wait for All SubCreator Instances to Finish
`abstract void` `waitFor(java.lang.String name)` Wait for SubCreator to Finish

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SubCreator

    public SubCreator()

### Method Detail

#### create

    public abstract boolean create(java.util.UUID player,
                                   java.lang.String name,
                                   SubCreator.ServerTemplate template,
                                   Version version,
                                   int port)

Create a SubServer

Parameters:
  `player` - Player Creating
  `name` - Server Name
  `template` - Server Template
  `version` - Server Version
  `port` - Server Port Number
Returns:
  Success Status

#### create

    public boolean create(java.lang.String name,
                          SubCreator.ServerTemplate template,
                          Version version,
                          int port)

Create a SubServer

Parameters:
  `name` - Server Name
  `template` - Server Template
  `version` - Server Version
  `port` - Server Port Number
Returns:
  Success Status

#### terminate

    public abstract void terminate()

Terminate All SubCreator Instances on this host

#### terminate

    public abstract void terminate(java.lang.String name)

Terminate a SubCreator Instance

Parameters:
  `name` - Name of current creating server

#### waitFor

    public abstract void waitFor()
                          throws java.lang.InterruptedException

Wait for All SubCreator Instances to Finish

Throws:
  `java.lang.InterruptedException`

#### waitFor

    public abstract void waitFor(java.lang.String name)
                          throws java.lang.InterruptedException

Wait for SubCreator to Finish

Parameters:
  `name` - Name of current creating server
Throws:
  `java.lang.InterruptedException`

#### getHost

    public abstract Host getHost()

Gets the host this creator belongs to

Returns:
  Host

#### getBashDirectory

    public abstract java.lang.String getBashDirectory()

Gets the Git Bash install directory

Returns:
  Git Bash Directory

#### getLogger

    public abstract java.util.List<SubLogger> getLogger()

Gets all loggers for All SubCreator Instances

Returns:
  SubCreator Loggers

#### getLogger

    public abstract SubLogger getLogger(java.lang.String thread)

Gets the Logger for a SubCreator Instance

Parameters:
  `thread` - Thread ID
Returns:
  SubCreator Logger

#### getReservedNames

    public abstract java.util.List<java.lang.String> getReservedNames()

Get a list of currently reserved Server names

Returns:
  Reserved Names

#### isReserved

    public static boolean isReserved(java.lang.String name)

Check if a name has been reserved

Parameters:
  `name` - Name to check
Returns:
  Reserved Status

#### getAllReservedNames

    public static java.util.Map<Host,java.util.List<java.lang.String>> getAllReservedNames()

Get a list of all currently reserved Server names across all hosts

Returns:
  All Reserved Names

#### getTemplates

    public abstract java.util.Map<java.lang.String,SubCreator.ServerTemplate> getTemplates()

Gets the Templates that can be used in this SubCreator instance

Returns:
  Template Map

#### getTemplate

    public abstract SubCreator.ServerTemplate getTemplate(java.lang.String name)

Gets a SubCreator Template by name

Parameters:
  `name` - Template Name
Returns:
  Template

#### reload

    public abstract void reload()

Reload SubCreator