Class AdvancementWrapper
java.lang.Object
com.fren_gor.ultimateAdvancementAPI.nms.wrappers.AbstractWrapper
com.fren_gor.ultimateAdvancementAPI.nms.wrappers.advancement.AdvancementWrapper
Wrapper class for NMS
Advancement
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull AdvancementWrapper
craftBaseAdvancement
(@NotNull MinecraftKeyWrapper key, @NotNull AdvancementWrapper parent, @NotNull AdvancementDisplayWrapper display, @Range(from=1, to=Integer.MAX_VALUE) int maxProgression) Creates a newAdvancementWrapper
for a base advancement.static @NotNull AdvancementWrapper
craftRootAdvancement
(@NotNull MinecraftKeyWrapper key, @NotNull AdvancementDisplayWrapper display, @Range(from=1, to=Integer.MAX_VALUE) int maxProgression) Creates a newAdvancementWrapper
for a root advancement.boolean
abstract @NotNull AdvancementDisplayWrapper
Gets the display wrapper of this advancement.abstract @NotNull MinecraftKeyWrapper
getKey()
Gets the namespaced key wrapper of this advancement.Gets the maximum progression of this advancement.abstract @Nullable AdvancementWrapper
Gets the parent advancement wrapper of this advancement.int
hashCode()
toString()
Methods inherited from class com.fren_gor.ultimateAdvancementAPI.nms.wrappers.AbstractWrapper
toNMS
-
Constructor Details
-
AdvancementWrapper
public AdvancementWrapper()
-
-
Method Details
-
craftRootAdvancement
@NotNull public static @NotNull AdvancementWrapper craftRootAdvancement(@NotNull @NotNull MinecraftKeyWrapper key, @NotNull @NotNull AdvancementDisplayWrapper display, @Range(from=1, to=Integer.MAX_VALUE) int maxProgression) throws ReflectiveOperationException Creates a newAdvancementWrapper
for a root advancement.- Parameters:
key
- The namespaced key wrapper of the advancement.display
- The display wrapper of the advancement.maxProgression
- The maximum progression of the advancement.- Returns:
- A new
AdvancementWrapper
for a RootAdvancement. - Throws:
ReflectiveOperationException
- If reflections goes wrong.
-
craftBaseAdvancement
@NotNull public static @NotNull AdvancementWrapper craftBaseAdvancement(@NotNull @NotNull MinecraftKeyWrapper key, @NotNull @NotNull AdvancementWrapper parent, @NotNull @NotNull AdvancementDisplayWrapper display, @Range(from=1, to=Integer.MAX_VALUE) int maxProgression) throws ReflectiveOperationException Creates a newAdvancementWrapper
for a base advancement.- Parameters:
key
- The namespaced key wrapper of the advancement.parent
- The wrapper of the parent advancement.display
- The display wrapper of the advancement.maxProgression
- The maximum progression of the advancement.- Returns:
- A new
AdvancementWrapper
for a BaseAdvancement. - Throws:
ReflectiveOperationException
- If reflections goes wrong.
-
getKey
Gets the namespaced key wrapper of this advancement.- Returns:
- The namespaced key wrapper of this advancement.
-
getParent
Gets the parent advancement wrapper of this advancement. Returnsnull
if this advancement is a root advancement.- Returns:
- The parent advancement wrapper of this advancement, or
null
if this advancement is a root advancement.
-
getDisplay
Gets the display wrapper of this advancement.- Returns:
- The display wrapper of this advancement.
-
getMaxProgression
Gets the maximum progression of this advancement.- Returns:
- The maximum progression of this advancement.
-
toString
- Overrides:
toString
in classAbstractWrapper
-
equals
- Overrides:
equals
in classAbstractWrapper
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractWrapper
-