Package net.minestom.server.advancements
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
-
Method Summary
Modifier and TypeMethodDescription@NotNull AdvancementTab
createTab
(@NotNull String rootIdentifier, @NotNull AdvancementRoot root) Creates a newAdvancementTab
with a singleAdvancementRoot
.@Nullable AdvancementTab
Gets an advancement tab by its root identifier.@NotNull Collection
<AdvancementTab> getTabs()
Gets all the createdAdvancementTab
.
-
Constructor Details
-
AdvancementManager
public AdvancementManager()
-
-
Method Details
-
createTab
@NotNull public @NotNull AdvancementTab createTab(@NotNull @NotNull String rootIdentifier, @NotNull @NotNull AdvancementRoot root) Creates a newAdvancementTab
with a singleAdvancementRoot
.- Parameters:
rootIdentifier
- the root identifierroot
- the root advancement- Returns:
- the newly created
AdvancementTab
- Throws:
IllegalStateException
- if a tab with the identifierrootIdentifier
already exists
-
getTab
Gets an advancement tab by its root identifier.- Parameters:
rootIdentifier
- the root identifier of the tab- Returns:
- the
AdvancementTab
associated with the identifier, null if not any
-
getTabs
Gets all the createdAdvancementTab
.- Returns:
- the collection containing all created
AdvancementTab
-