Package cz.jeme.advancium
Interface CustomAdvancementDisplay
@NullMarked
public sealed interface CustomAdvancementDisplay
Represents the display properties of a custom advancement.
Custom advancements can have custom icons, titles, descriptions, and other visual and behavioral settings shown to players. This interface provides a set of methods to access and configure such display settings.
The icon() and the title() of the root advancement are used in the tab's display data.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder interface for creating and configuringCustomAdvancementDisplayinstances.static enumEnum representing the frame types of a custom advancement. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether the advancement is announced in the chat when achieved.net.kyori.adventure.text.ComponentGets the description of the advancement.display()Creates a new builder for configuring and building aCustomAdvancementDisplay.static CustomAdvancementDisplayempty()Returns an empty implementation ofCustomAdvancementDisplay, containing default values.frame()Gets the frame type of the advancement, which informs the visual style and importance.booleanhidden()Checks whether the advancement is hidden until it is unlocked.org.bukkit.inventory.ItemStackicon()Gets the icon associated with the advancement.booleanChecks whether a notification toast is shown to the player when the advancement is achieved.net.kyori.adventure.text.Componenttitle()Gets the title of the advancement.
-
Method Details
-
display
Creates a new builder for configuring and building aCustomAdvancementDisplay.- Returns:
- the builder instance
-
empty
Returns an empty implementation ofCustomAdvancementDisplay, containing default values.- Returns:
- an empty custom advancement display
-
icon
org.bukkit.inventory.ItemStack icon()Gets the icon associated with the advancement.- Returns:
- the
ItemStackicon
-
title
net.kyori.adventure.text.Component title()Gets the title of the advancement.- Returns:
- the title as a
Component
-
description
net.kyori.adventure.text.Component description()Gets the description of the advancement.- Returns:
- the description as a
Component
-
frame
CustomAdvancementDisplay.Frame frame()Gets the frame type of the advancement, which informs the visual style and importance.- Returns:
- the
CustomAdvancementDisplay.Frametype
-
showToast
boolean showToast()Checks whether a notification toast is shown to the player when the advancement is achieved.- Returns:
trueif the toast is shown, otherwisefalse
-
announceToChat
boolean announceToChat()Checks whether the advancement is announced in the chat when achieved.- Returns:
trueif the achievement is announced, otherwisefalse
-