Class FancyAdvancementDisplay
FancyAdvancementDisplay
class provides a fancier graphical aspect to advancements than AdvancementDisplay
.
The differences are the following:
- The default title color is
DEFAULT_TITLE_COLOR
; - The default description color is
DEFAULT_DESCRIPTION_COLOR
; - Title and description colors can be customized from constructors;
- An empty line is inserted (if not present) at the start of
AdvancementDisplay.chatDescription
in order to create a little separator between the title and the description in the competition chat message.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ChatColor
The default color of the description.static final ChatColor
The default color of the title.Fields inherited from class com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementDisplay
announceChat, chatDescription, chatTitle, compactDescription, description, frame, icon, rawTitle, showToast, title, x, y
-
Constructor Summary
ConstructorDescriptionFancyAdvancementDisplay
(@NotNull Material icon, @NotNull String title, @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull String... description) Creates a newFancyAdvancementDisplay
.FancyAdvancementDisplay
(@NotNull Material icon, @NotNull String title, @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull List<String> description) Creates a newFancyAdvancementDisplay
.FancyAdvancementDisplay
(@NotNull ItemStack icon, @NotNull String title, @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull String... description) Create a newFancyAdvancementDisplay
.FancyAdvancementDisplay
(@NotNull ItemStack icon, @NotNull String title, @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull List<String> description) Create a newFancyAdvancementDisplay
.FancyAdvancementDisplay
(@NotNull ItemStack icon, @NotNull String title, @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull ChatColor defaultTitleColor, @NotNull ChatColor defaultDescriptionColor, @NotNull String... description) Create a newFancyAdvancementDisplay
.FancyAdvancementDisplay
(@NotNull ItemStack icon, @NotNull String title, @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull ChatColor defaultTitleColor, @NotNull ChatColor defaultDescriptionColor, @NotNull List<String> description) Create a newFancyAdvancementDisplay
. -
Method Summary
Methods inherited from class com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementDisplay
doesAnnounceToChat, doesShowToast, getChatDescription, getChatTitle, getCompactDescription, getDescription, getFrame, getIcon, getNMSWrapper, getRawTitle, getTitle, getX, getY
-
Field Details
-
DEFAULT_TITLE_COLOR
The default color of the title. -
DEFAULT_DESCRIPTION_COLOR
The default color of the description.
-
-
Constructor Details
-
FancyAdvancementDisplay
public FancyAdvancementDisplay(@NotNull @NotNull Material icon, @NotNull @NotNull String title, @NotNull @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull @NotNull String... description) Creates a newFancyAdvancementDisplay
.The advancement is positioned by the x and y coordinates in the advancement GUI. The origin is placed in the upper-left corner of the advancement GUI. The x-axis points to the right (as usual), whereas the y-axis points downward. Thus, the x and y coordinates must be positive.
- Parameters:
icon
- The material of the advancement's icon in the advancement GUI.title
- The title of the advancement.frame
- The shape of the advancement frame in the advancement GUI.showToast
- Whether the toast notification should be sent on advancement grant.announceChat
- Whether the advancement completion message should be sent on advancement grant.x
- The advancement x coordinate. Must be not negative.y
- The advancement y coordinate. Must be not negative.description
- The description of the advancement.
-
FancyAdvancementDisplay
public FancyAdvancementDisplay(@NotNull @NotNull Material icon, @NotNull @NotNull String title, @NotNull @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull @NotNull List<String> description) Creates a newFancyAdvancementDisplay
.The advancement is positioned by the x and y coordinates in the advancement GUI. The origin is placed in the upper-left corner of the advancement GUI. The x-axis points to the right (as usual), whereas the y-axis points downward. Thus, the x and y coordinates must be positive.
- Parameters:
icon
- The material of the advancement's icon in the advancement GUI.title
- The title of the advancement.frame
- The shape of the advancement frame in the advancement GUI.showToast
- Whether the toast notification should be sent on advancement grant.announceChat
- Whether the advancement completion message should be sent on advancement grant.x
- The advancement x coordinate. Must be not negative.y
- The advancement y coordinate. Must be not negative.description
- The description of the advancement.
-
FancyAdvancementDisplay
public FancyAdvancementDisplay(@NotNull @NotNull ItemStack icon, @NotNull @NotNull String title, @NotNull @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull @NotNull String... description) Create a newFancyAdvancementDisplay
.The advancement is positioned by the x and y coordinates in the advancement GUI. The origin is placed in the upper-left corner of the advancement GUI. The x-axis points to the right (as usual), whereas the y-axis points downward. Thus, the x and y coordinates must be positive.
- Parameters:
icon
- The advancement's icon in the advancement GUI.title
- The title of the advancement.frame
- The shape of the advancement frame in the advancement GUI.showToast
- Whether the toast notification should be sent on advancement grant.announceChat
- Whether the advancement completion message should be sent on advancement grant.x
- The advancement x coordinate. Must be not negative.y
- The advancement y coordinate. Must be not negative.description
- The description of the advancement.
-
FancyAdvancementDisplay
public FancyAdvancementDisplay(@NotNull @NotNull ItemStack icon, @NotNull @NotNull String title, @NotNull @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull @NotNull List<String> description) Create a newFancyAdvancementDisplay
.The advancement is positioned by the x and y coordinates in the advancement GUI. The origin is placed in the upper-left corner of the advancement GUI. The x-axis points to the right (as usual), whereas the y-axis points downward. Thus, the x and y coordinates must be positive.
- Parameters:
icon
- The advancement's icon in the advancement GUI.title
- The title of the advancement.frame
- The shape of the advancement frame in the advancement GUI.showToast
- Whether the toast notification should be sent on advancement grant.announceChat
- Whether the advancement completion message should be sent on advancement grant.x
- The advancement x coordinate. Must be not negative.y
- The advancement y coordinate. Must be not negative.description
- The description of the advancement.
-
FancyAdvancementDisplay
public FancyAdvancementDisplay(@NotNull @NotNull ItemStack icon, @NotNull @NotNull String title, @NotNull @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull @NotNull ChatColor defaultTitleColor, @NotNull @NotNull ChatColor defaultDescriptionColor, @NotNull @NotNull String... description) Create a newFancyAdvancementDisplay
.The advancement is positioned by the x and y coordinates in the advancement GUI. The origin is placed in the upper-left corner of the advancement GUI. The x-axis points to the right (as usual), whereas the y-axis points downward. Thus, the x and y coordinates must be positive.
- Parameters:
icon
- The advancement's icon in the advancement GUI.title
- The title of the advancement.frame
- The shape of the advancement frame in the advancement GUI.showToast
- Whether the toast notification should be sent on advancement grant.announceChat
- Whether the advancement completion message should be sent on advancement grant.x
- The advancement x coordinate. Must be not negative.y
- The advancement y coordinate. Must be not negative.defaultTitleColor
- The default color of the title.defaultDescriptionColor
- The default color of the description.description
- The description of the advancement.
-
FancyAdvancementDisplay
public FancyAdvancementDisplay(@NotNull @NotNull ItemStack icon, @NotNull @NotNull String title, @NotNull @NotNull AdvancementFrameType frame, boolean showToast, boolean announceChat, float x, float y, @NotNull @NotNull ChatColor defaultTitleColor, @NotNull @NotNull ChatColor defaultDescriptionColor, @NotNull @NotNull List<String> description) Create a newFancyAdvancementDisplay
.The advancement is positioned by the x and y coordinates in the advancement GUI. The origin is placed in the upper-left corner of the advancement GUI. The x-axis points to the right (as usual), whereas the y-axis points downward. Thus, the x and y coordinates must be positive.
- Parameters:
icon
- The advancement's icon in the advancement GUI.title
- The title of the advancement.frame
- The shape of the advancement frame in the advancement GUI.showToast
- Whether the toast notification should be sent on advancement grant.announceChat
- Whether the advancement completion message should be sent on advancement grant.x
- The advancement x coordinate. Must be not negative.y
- The advancement y coordinate. Must be not negative.defaultTitleColor
- The default color of the title.defaultDescriptionColor
- The default color of the description.description
- The description of the advancement.
-