Interface CustomAdvancementTab.Builder

Enclosing interface:
CustomAdvancementTab

public static sealed interface CustomAdvancementTab.Builder
Builder for creating and configuring instances of CustomAdvancementTab.
  • Method Details

    • root

      Sets the root advancement for the tab.

      This is a mandatory parameter of this builder!

      Parameters:
      builder - a builder for the root CustomAdvancement
      Returns:
      this builder instance for chaining
    • background

      CustomAdvancementTab.Builder background(org.bukkit.NamespacedKey background)
      Sets the background texture for the tab using a NamespacedKey.

      Default: minecraft:textures/gui/advancements/backgrounds/stone.png

      Parameters:
      background - the NamespacedKey of the background texture
      Returns:
      this builder instance for chaining
    • background

      default CustomAdvancementTab.Builder background(@KeyPattern String background)
      Sets the background texture for the tab using a string representation of a NamespacedKey.

      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 the CustomAdvancementTab.

      This also loads the tab into the server, making it visible in the game.

      Returns:
      the built CustomAdvancementTab