Class AdvancementDisplayWrapper
java.lang.Object
com.fren_gor.ultimateAdvancementAPI.nms.wrappers.AbstractWrapper
com.fren_gor.ultimateAdvancementAPI.nms.wrappers.advancement.AdvancementDisplayWrapper
Wrapper class for NMS
AdvancementDisplay
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncraft
(@NotNull ItemStack icon, @NotNull String title, @NotNull String description, @NotNull AdvancementFrameTypeWrapper frameType, float x, float y) Creates a newAdvancementDisplayWrapper
.craft
(@NotNull ItemStack icon, @NotNull String title, @NotNull String description, @NotNull AdvancementFrameTypeWrapper frameType, float x, float y, boolean showToast, boolean announceChat, boolean hidden) Creates a newAdvancementDisplayWrapper
.craft
(@NotNull ItemStack icon, @NotNull String title, @NotNull String description, @NotNull AdvancementFrameTypeWrapper frameType, float x, float y, boolean showToast, boolean announceChat, boolean hidden, @Nullable String backgroundTexture) Creates a newAdvancementDisplayWrapper
.craft
(@NotNull ItemStack icon, @NotNull String title, @NotNull String description, @NotNull AdvancementFrameTypeWrapper frameType, float x, float y, @Nullable String backgroundTexture) Creates a newAdvancementDisplayWrapper
.abstract boolean
Returns whether grants are announced to chat.abstract boolean
Returns whether toast is shown on grant.abstract @NotNull AdvancementFrameTypeWrapper
Gets the frame type of the advancement.Gets the path of the background texture of the advancement GUI.Gets the description of the advancement.getIcon()
Gets the icon of the advancement.getTitle()
Gets the title of the advancement.abstract float
getX()
Gets the x coordinate of the advancement in the advancement GUI.abstract float
getY()
Gets the y coordinate of the advancement in the advancement GUI.abstract boolean
isHidden()
Returns whether the advancement should be hidden in the advancement GUI.Methods inherited from class com.fren_gor.ultimateAdvancementAPI.nms.wrappers.AbstractWrapper
equals, hashCode, toNMS, toString
-
Constructor Details
-
AdvancementDisplayWrapper
public AdvancementDisplayWrapper()
-
-
Method Details
-
craft
@NotNull public static @NotNull AdvancementDisplayWrapper craft(@NotNull @NotNull ItemStack icon, @NotNull @NotNull String title, @NotNull @NotNull String description, @NotNull @NotNull AdvancementFrameTypeWrapper frameType, float x, float y) throws ReflectiveOperationException Creates a newAdvancementDisplayWrapper
.The returned
AdvancementDisplayWrapper
is not hidden, doesn't show toast, doesn't announce to chat, and doesn't have a background texture.- Parameters:
icon
- The icon of the advancement.title
- The title of the advancement.description
- The description of the advancement.frameType
- The frame type of the advancement.x
- The x coordinate in the advancement GUI.y
- The y coordinate in the advancement GUI.- Returns:
- A new
AdvancementDisplayWrapper
. - Throws:
ReflectiveOperationException
- If reflections goes wrong.
-
craft
@NotNull public static @NotNull AdvancementDisplayWrapper craft(@NotNull @NotNull ItemStack icon, @NotNull @NotNull String title, @NotNull @NotNull String description, @NotNull @NotNull AdvancementFrameTypeWrapper frameType, float x, float y, @Nullable @Nullable String backgroundTexture) throws ReflectiveOperationException Creates a newAdvancementDisplayWrapper
.The returned
AdvancementDisplayWrapper
is not hidden, doesn't show toast, and doesn't announce to chat.- Parameters:
icon
- The icon of the advancement.title
- The title of the advancement.description
- The description of the advancement.frameType
- The frame type of the advancement.x
- The x coordinate in the advancement GUI.y
- The y coordinate in the advancement GUI.backgroundTexture
- The path of the background texture of the advancement GUI. May benull
if the advancement doesn't have a background texture.- Returns:
- A new
AdvancementDisplayWrapper
. - Throws:
ReflectiveOperationException
- If reflections goes wrong.
-
craft
@NotNull public static @NotNull AdvancementDisplayWrapper craft(@NotNull @NotNull ItemStack icon, @NotNull @NotNull String title, @NotNull @NotNull String description, @NotNull @NotNull AdvancementFrameTypeWrapper frameType, float x, float y, boolean showToast, boolean announceChat, boolean hidden) throws ReflectiveOperationException Creates a newAdvancementDisplayWrapper
.The returned
AdvancementDisplayWrapper
doesn't have a background texture.- Parameters:
icon
- The icon of the advancement.title
- The title of the advancement.description
- The description of the advancement.frameType
- The frame type of the advancement.x
- The x coordinate in the advancement GUI.y
- The y coordinate in the advancement GUI.showToast
- Whether to show toast on grant.announceChat
- Whether to announce grants to chat.hidden
- Whether the advancement should be not visible in the advancement GUI. Connections to other advancements are always displayed.- Returns:
- A new
AdvancementDisplayWrapper
. - Throws:
ReflectiveOperationException
- If reflections goes wrong.
-
craft
@NotNull public static @NotNull AdvancementDisplayWrapper craft(@NotNull @NotNull ItemStack icon, @NotNull @NotNull String title, @NotNull @NotNull String description, @NotNull @NotNull AdvancementFrameTypeWrapper frameType, float x, float y, boolean showToast, boolean announceChat, boolean hidden, @Nullable @Nullable String backgroundTexture) throws ReflectiveOperationException Creates a newAdvancementDisplayWrapper
.- Parameters:
icon
- The icon of the advancement.title
- The title of the advancement.description
- The description of the advancement.frameType
- The frame type of the advancement.x
- The x coordinate in the advancement GUI.y
- The y coordinate in the advancement GUI.showToast
- Whether to show toast on grant.announceChat
- Whether to announce grants to chat.hidden
- Whether the advancement should be not visible in the advancement GUI. Connections to other advancements are always displayed.backgroundTexture
- The path of the background texture of the advancement GUI. May benull
if the advancement doesn't have a background texture.- Returns:
- A new
AdvancementDisplayWrapper
. - Throws:
ReflectiveOperationException
- If reflections goes wrong.
-
getIcon
Gets the icon of the advancement.- Returns:
- The icon of the advancement.
-
getTitle
Gets the title of the advancement.- Returns:
- The title of the advancement.
-
getDescription
Gets the description of the advancement.- Returns:
- The description of the advancement.
-
getAdvancementFrameType
Gets the frame type of the advancement.- Returns:
- The frame type of the advancement.
-
getX
public abstract float getX()Gets the x coordinate of the advancement in the advancement GUI.- Returns:
- The x coordinate of the advancement in the advancement GUI.
-
getY
public abstract float getY()Gets the y coordinate of the advancement in the advancement GUI.- Returns:
- The y coordinate of the advancement in the advancement GUI.
-
doesShowToast
public abstract boolean doesShowToast()Returns whether toast is shown on grant.- Returns:
- Whether toast is shown on grant.
-
doesAnnounceToChat
public abstract boolean doesAnnounceToChat()Returns whether grants are announced to chat.- Returns:
- Whether grants are announced to chat.
-
isHidden
public abstract boolean isHidden()Returns whether the advancement should be hidden in the advancement GUI.- Returns:
- Whether the advancement should be hidden in the advancement GUI.
-
getBackgroundTexture
Gets the path of the background texture of the advancement GUI.- Returns:
- The path of the background texture of the advancement GUI, or
null
if the advancement doesn't have a background texture.
-