Class AdvancementDisplay.Builder
- Enclosing class:
AdvancementDisplay
AdvancementDisplay
.- Since:
- 2.1.0
-
Field Summary
Modifier and TypeFieldDescriptionprotected ChatColor
The default color of the title and description.Fields inherited from class com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementDisplayBuilder
announceChat, description, frame, icon, showToast, title, x, y
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the advancement display.Sets the shape of the advancement frame toAdvancementFrameType.CHALLENGE
.defaultColor
(@NotNull ChatColor defaultColor) Sets the default color of the title and description.frame
(@NotNull AdvancementFrameType frame) Sets the shape of the advancement frame in the advancement GUI.Gets the default color of the title and description.Sets the shape of the advancement frame toAdvancementFrameType.GOAL
.Sets the shape of the advancement frame toAdvancementFrameType.TASK
.Methods inherited from class com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementDisplayBuilder
announceChat, announceChat, coords, coords, description, description, doesAnnounceToChat, doesShowToast, getDescription, getFrame, getIcon, getTitle, getX, getY, showToast, showToast, x, y
-
Field Details
-
defaultColor
The default color of the title and description.
-
-
Constructor Details
-
Builder
Creates a newAdvancementDisplay.Builder
.By default, the advancement display returned by
build()
won't show both the toast message and the announcement message in the chat upon advancement completion.The default
frame
isAdvancementFrameType.TASK
.The default
defaultColor
isAdvancementFrameType.TASK.getColor()
.- Parameters:
icon
- The material of the advancement's icon in the advancement GUI.title
- The title of the advancement.
-
Builder
Creates a newAdvancementDisplay.Builder
.By default, the advancement display returned by
build()
won't show both the toast message and the announcement message in the chat upon advancement completion.The default
frame
isAdvancementFrameType.TASK
.The default
defaultColor
isAdvancementFrameType.TASK.getColor()
.- Parameters:
icon
- The advancement's icon in the advancement GUI.title
- The title of the advancement.
-
-
Method Details
-
frame
@NotNull public @NotNull AdvancementDisplay.Builder frame(@NotNull @NotNull AdvancementFrameType frame) Sets the shape of the advancement frame in the advancement GUI.If
builder.defaultColor(...)
hasn't been called yet (or if it will never be called), also sets thedefault color
toframe.getColor()
.- Overrides:
frame
in classAdvancementDisplayBuilder<AdvancementDisplay.Builder,
AdvancementDisplay> - Parameters:
frame
- The shape of the advancement frame in the advancement GUI.- Returns:
- This builder.
-
taskFrame
Sets the shape of the advancement frame toAdvancementFrameType.TASK
.If
builder.defaultColor(...)
hasn't been called yet (or if it will never be called), also sets thedefault color
toAdvancementFrameType.TASK.getColor()
.- Overrides:
taskFrame
in classAdvancementDisplayBuilder<AdvancementDisplay.Builder,
AdvancementDisplay> - Returns:
- This builder.
-
goalFrame
Sets the shape of the advancement frame toAdvancementFrameType.GOAL
.If
builder.defaultColor(...)
hasn't been called yet (or if it will never be called), also sets thedefault color
toAdvancementFrameType.GOAL.getColor()
.- Overrides:
goalFrame
in classAdvancementDisplayBuilder<AdvancementDisplay.Builder,
AdvancementDisplay> - Returns:
- This builder.
-
challengeFrame
Sets the shape of the advancement frame toAdvancementFrameType.CHALLENGE
.If
builder.defaultColor(...)
hasn't been called yet (or if it will never be called), also sets thedefault color
toAdvancementFrameType.CHALLENGE.getColor()
.- Overrides:
challengeFrame
in classAdvancementDisplayBuilder<AdvancementDisplay.Builder,
AdvancementDisplay> - Returns:
- This builder.
-
defaultColor
@NotNull public @NotNull AdvancementDisplay.Builder defaultColor(@NotNull @NotNull ChatColor defaultColor) Sets the default color of the title and description.- Parameters:
defaultColor
- The default color of the title and description.- Returns:
- This builder.
-
build
Builds the advancement display.- Specified by:
build
in classAdvancementDisplayBuilder<AdvancementDisplay.Builder,
AdvancementDisplay> - Returns:
- The built advancement display.
-
getDefaultColor
Gets the default color of the title and description.- Returns:
- The default color of the title and description.
-