Class AdvancementManager
java.lang.Object
net.minestom.server.advancements.AdvancementManager
Used to manage all the registered
AdvancementTab.
Use createTab(String, AdvancementRoot) to create a tab with the appropriate AdvancementRoot.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTab(String rootIdentifier, AdvancementRoot root) Creates a newAdvancementTabwith a singleAdvancementRoot.Gets an advancement tab by its root identifier.getTabs()Gets all the createdAdvancementTab.
-
Constructor Details
-
AdvancementManager
public AdvancementManager()
-
-
Method Details
-
createTab
Creates a newAdvancementTabwith a singleAdvancementRoot.- Parameters:
rootIdentifier- the root identifierroot- the root advancement- Returns:
- the newly created
AdvancementTab - Throws:
IllegalStateException- if a tab with the identifierrootIdentifieralready exists
-
getTab
Gets an advancement tab by its root identifier.- Parameters:
rootIdentifier- the root identifier of the tab- Returns:
- the
AdvancementTabassociated with the identifier, null if not any
-
getTabs
Gets all the createdAdvancementTab.- Returns:
- the collection containing all created
AdvancementTab
-