Class AdvancementDisplay.Builder
java.lang.Object
com.github.darksoulq.abyssallib.world.advancement.AdvancementDisplay.Builder
- Enclosing class:
AdvancementDisplay
A fluent builder class for creating
AdvancementDisplay instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionannounceToChat(boolean announceToChat) Sets whether to announce completion to chat.background(net.kyori.adventure.key.Key background) Sets the background texture for the advancement.build()Finalizes the creation of the AdvancementDisplay instance.description(net.kyori.adventure.text.Component description) Sets the description for the advancement.frame(AdvancementFrame frame) Sets the frame style for the advancement.hidden(boolean hidden) Sets whether the advancement is hidden.icon(org.bukkit.inventory.ItemStack icon) Sets the icon for the advancement.showToast(boolean showToast) Sets whether to show a toast notification.title(net.kyori.adventure.text.Component title) Sets the title for the advancement.x(float x) Sets the horizontal position in the tree.y(float y) Sets the vertical position in the tree.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
title
Sets the title for the advancement.- Parameters:
title- The AdventureComponenttitle.- Returns:
- This builder instance for chaining.
-
description
Sets the description for the advancement.- Parameters:
description- The AdventureComponentdescription.- Returns:
- This builder instance for chaining.
-
icon
Sets the icon for the advancement.- Parameters:
icon- TheItemStackto display.- Returns:
- This builder instance for chaining.
-
background
Sets the background texture for the advancement.- Parameters:
background- The resourceKeyfor the background.- Returns:
- This builder instance for chaining.
-
frame
Sets the frame style for the advancement.- Parameters:
frame- TheAdvancementFramestyle.- Returns:
- This builder instance for chaining.
-
showToast
Sets whether to show a toast notification.- Parameters:
showToast- True to show toast.- Returns:
- This builder instance for chaining.
-
announceToChat
Sets whether to announce completion to chat.- Parameters:
announceToChat- True to announce.- Returns:
- This builder instance for chaining.
-
x
Sets the horizontal position in the tree.- Parameters:
x- The X position.- Returns:
- This builder instance for chaining.
-
y
Sets the vertical position in the tree.- Parameters:
y- The Y position.- Returns:
- This builder instance for chaining.
-
build
Finalizes the creation of the AdvancementDisplay instance.- Returns:
- A new
AdvancementDisplayinstance.
-