Class AdvancementBuilder
java.lang.Object
fr.multimc.api.spigot.common.advancements.AdvancementBuilder
A builder class for
AdvancementDisplay.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementDisplaybuild()Builds and returns theAdvancementDisplayobject based on the previously set properties.setAnnounceToChat(boolean announceToChat) Specifies whether the advancement should be announced in the chat.setDescription(@NotNull List<String> description) Sets the description of theAdvancementDisplay.setFrameType(@NotNull com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementFrameType frameType) Sets the frame type of theAdvancementDisplay.setIcon(@NotNull org.bukkit.Material material) Sets the icon of theAdvancementDisplay.setLocation(float x, float y) Set the advancement locationsetShowToast(boolean showToast) Sets whether theAdvancementDisplayshould show a toast.Sets the title of theAdvancementDisplay.
-
Constructor Details
-
AdvancementBuilder
public AdvancementBuilder()
-
-
Method Details
-
setIcon
Sets the icon of theAdvancementDisplay.- Parameters:
material- theMaterialto use as the icon.- Returns:
- this builder instance.
-
setTitle
Sets the title of theAdvancementDisplay.- Parameters:
title- the title of theAdvancementDisplay.- Returns:
- this builder instance.
-
setDescription
Sets the description of theAdvancementDisplay.- Parameters:
description- the description of theAdvancementDisplay.- Returns:
- this builder instance.
-
setFrameType
public AdvancementBuilder setFrameType(@NotNull @NotNull com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementFrameType frameType) Sets the frame type of theAdvancementDisplay.- Parameters:
frameType- theAdvancementFrameTypeof theAdvancementDisplay.- Returns:
- this builder instance.
-
setLocation
Set the advancement location- Parameters:
x- the x coordinate of theAdvancementDisplay.y- the y coordinate of theAdvancementDisplay.- Returns:
- this builder instance.
-
setShowToast
Sets whether theAdvancementDisplayshould show a toast.- Parameters:
showToast- `true` if theAdvancementDisplayshould show a toast, `false` otherwise.- Returns:
- this builder instance.
-
setAnnounceToChat
Specifies whether the advancement should be announced in the chat.- Parameters:
announceToChat- true if the advancement should be announced in the chat, false otherwise.- Returns:
- the current
AdvancementBuilderinstance.
-
build
public com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementDisplay build()Builds and returns theAdvancementDisplayobject based on the previously set properties.- Returns:
- a new instance of
AdvancementDisplay.
-