Package cz.jeme.advancium
Interface CustomAdvancementTab.Builder
- Enclosing interface:
CustomAdvancementTab
public static sealed interface CustomAdvancementTab.Builder
Builder for creating and configuring instances of
CustomAdvancementTab.-
Method Summary
Modifier and TypeMethodDescriptiondefault CustomAdvancementTab.Builderbackground(String background) Sets the background texture for the tab using a string representation of aNamespacedKey.background(org.bukkit.NamespacedKey background) Sets the background texture for the tab using aNamespacedKey.Builds and registers theCustomAdvancementTab.root(CustomAdvancement.Builder builder) Sets the root advancement for the tab.
-
Method Details
-
root
Sets the root advancement for the tab.This is a mandatory parameter of this builder!
- Parameters:
builder- a builder for the rootCustomAdvancement- Returns:
- this builder instance for chaining
-
background
Sets the background texture for the tab using aNamespacedKey.Default:
minecraft:textures/gui/advancements/backgrounds/stone.png- Parameters:
background- theNamespacedKeyof the background texture- Returns:
- this builder instance for chaining
-
background
Sets the background texture for the tab using a string representation of aNamespacedKey.The string key is converted into a
NamespacedKey. If the key is invalid, an exception is thrown.Default:
minecraft:textures/gui/advancements/backgrounds/stone.png- Parameters:
background- the string representation of the background key- Returns:
- this builder instance for chaining
- Throws:
NullPointerException- if the key is invalid
-
buildAndLoad
CustomAdvancementTab buildAndLoad()Builds and registers theCustomAdvancementTab.This also loads the tab into the server, making it visible in the game.
- Returns:
- the built
CustomAdvancementTab
-