public class GlowAdvancement extends Object implements org.bukkit.advancement.Advancement
Constructor and Description |
---|
GlowAdvancement(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.
|
Modifier and Type | Method and Description |
---|---|
void |
addCriterion(String criterion)
Adds a criterion.
|
void |
addRequirement(List<String> criteria) |
protected boolean |
canEqual(Object other) |
io.netty.buffer.ByteBuf |
encode(io.netty.buffer.ByteBuf buf)
Writes a notification of earning this advancement to a byte buffer.
|
boolean |
equals(Object o) |
List<String> |
getCriteria() |
List<String> |
getCriteriaIds() |
GlowAdvancementDisplay |
getDisplay() |
org.bukkit.NamespacedKey |
getKey() |
GlowAdvancement |
getParent() |
List<List<String>> |
getRequirements() |
int |
hashCode() |
void |
setDisplay(GlowAdvancementDisplay display) |
String |
toString() |
public GlowAdvancement(org.bukkit.NamespacedKey key, GlowAdvancement parent)
key
- the namespace and name of the advancementparent
- the prerequisite advancement, or nullpublic GlowAdvancement(org.bukkit.NamespacedKey key, GlowAdvancement parent, GlowAdvancementDisplay display)
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 notificationpublic void addCriterion(String criterion)
criterion
- TODO: document where this ID comes frompublic List<String> getCriteria()
getCriteria
in interface org.bukkit.advancement.Advancement
public io.netty.buffer.ByteBuf encode(io.netty.buffer.ByteBuf buf) throws IOException
buf
- a ByteBuf
buf
with this advancement written to itIOException
- if a string is too longpublic org.bukkit.NamespacedKey getKey()
getKey
in interface org.bukkit.Keyed
public GlowAdvancement getParent()
public GlowAdvancementDisplay getDisplay()
public void setDisplay(GlowAdvancementDisplay display)
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.