Package net.glowstone.advancement
Class GlowAdvancement
java.lang.Object
net.glowstone.advancement.GlowAdvancement
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed
,org.bukkit.advancement.Advancement
,org.bukkit.Keyed
-
Constructor Summary
ConstructorDescriptionGlowAdvancement
(org.bukkit.NamespacedKey key, GlowAdvancement parent) Creates an advancement with the default notification.GlowAdvancement
(org.bukkit.NamespacedKey key, GlowAdvancement parent, GlowAdvancementDisplay display) Creates an advancement. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCriterion
(String criterion) Adds a criterion.void
addRequirement
(List<String> criteria) protected boolean
io.netty.buffer.ByteBuf
encode
(io.netty.buffer.ByteBuf buf) Writes a notification of earning this advancement to a byte buffer.boolean
@NotNull @Unmodifiable Collection<org.bukkit.advancement.Advancement>
@Nullable io.papermc.paper.advancement.AdvancementDisplay
org.bukkit.NamespacedKey
getKey()
@NotNull org.bukkit.advancement.Advancement
getRoot()
int
hashCode()
void
setDisplay
(GlowAdvancementDisplay display) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bukkit.Keyed
key
-
Constructor Details
-
GlowAdvancement
Creates an advancement with the default notification.- Parameters:
key
- the namespace and name of the advancementparent
- the prerequisite advancement, or null
-
GlowAdvancement
public GlowAdvancement(org.bukkit.NamespacedKey key, GlowAdvancement parent, GlowAdvancementDisplay display) Creates an advancement.- Parameters:
key
- the namespace and name of the advancementparent
- the prerequisite advancement, or null for no prerequisitedisplay
- the parameters for the notification when this advancement is earned, or null for the default notification
-
-
Method Details
-
addCriterion
Adds a criterion.- Parameters:
criterion
- TODO: document where this ID comes from
-
addRequirement
-
getCriteria
- Specified by:
getCriteria
in interfaceorg.bukkit.advancement.Advancement
-
getChildren
- Specified by:
getChildren
in interfaceorg.bukkit.advancement.Advancement
-
getRoot
@NotNull public @NotNull org.bukkit.advancement.Advancement getRoot()- Specified by:
getRoot
in interfaceorg.bukkit.advancement.Advancement
-
encode
Writes a notification of earning this advancement to a byte buffer.- Parameters:
buf
- aByteBuf
- Returns:
buf
with this advancement written to it- Throws:
IOException
- if a string is too long
-
getDisplay
@Nullable public @Nullable io.papermc.paper.advancement.AdvancementDisplay getDisplay()- Specified by:
getDisplay
in interfaceorg.bukkit.advancement.Advancement
-
getKey
public org.bukkit.NamespacedKey getKey()- Specified by:
getKey
in interfaceorg.bukkit.Keyed
-
getParent
- Specified by:
getParent
in interfaceorg.bukkit.advancement.Advancement
-
getCriteriaIds
-
getRequirements
-
setDisplay
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-