Class ArenaManager<T,A extends Arena & ManagedArena<T>> 
java.lang.Object
io.github.projectunified.minigamecore.base.FeatureUnit
io.github.projectunified.minigamecore.manager.ArenaManager<T,A> 
- Type Parameters:
- T- the type of the identifier of the arena
- A- the type of the arena
- All Implemented Interfaces:
- Initializer
- Direct Known Subclasses:
- LoadedArenaManager
The manager that handles all arenas
- 
Constructor SummaryConstructorsConstructorDescriptionArenaManager(FeatureUnit... parent) Create a new arena managerArenaManager(List<FeatureUnit> parentList) Create a new arena manager
- 
Method SummaryModifier and TypeMethodDescriptionbooleanAdd an arenavoidclear()Clear the objectvoidClear all arenasbooleancontainsArena(T identifier) Check if the arena manager contains the arenaCreate an arenaGet all arenasGet the arena by its identifierGet the arena mapvoidpostInit()Called on special event when all the objects are initializedvoidremoveArena(T identifier) Remove an arenaMethods inherited from class io.github.projectunified.minigamecore.base.FeatureUnitgetFeature, getFeatures, getGameState, getGameStates, getParent, getParentList, init, loadFeatures, loadGameStates
- 
Constructor Details- 
ArenaManagerCreate a new arena manager- Parameters:
- parentList- the parent- FeatureUnitlist
 
- 
ArenaManagerCreate a new arena manager- Parameters:
- parent- the parent- FeatureUnit
 
 
- 
- 
Method Details- 
postInitpublic void postInit()Description copied from interface:InitializerCalled on special event when all the objects are initialized- Specified by:
- postInitin interface- Initializer
- Overrides:
- postInitin class- FeatureUnit
 
- 
clearpublic void clear()Description copied from interface:InitializerClear the object- Specified by:
- clearin interface- Initializer
- Overrides:
- clearin class- FeatureUnit
 
- 
containsArenaCheck if the arena manager contains the arena- Parameters:
- identifier- the identifier
- Returns:
- true if it does
 
- 
getArenaGet the arena by its identifier- Parameters:
- identifier- the identifier
- Returns:
- the arena
 
- 
getArenaMapGet the arena map- Returns:
- the arena map
 
- 
getAllArenasGet all arenas- Returns:
- the collection of arenas
 
- 
addArenaAdd an arena- Parameters:
- arena- the arena
 
- 
removeArenaRemove an arena- Parameters:
- identifier- the identifier
 
- 
clearAllArenaspublic void clearAllArenas()Clear all arenas
- 
createArenapublic Optional<A> createArena(T identifier, Function<T, A> arenaCreator, Consumer<A> onCreateConsumer) Create an arena- Parameters:
- identifier- the identifier
- arenaCreator- the arena creator
- onCreateConsumer- the consumer that will be called when the arena is created
- Returns:
- the created arena
 
 
-