Package net.glowstone.advancement
Class GlowAdvancement
java.lang.Object
net.glowstone.advancement.GlowAdvancement
- All Implemented Interfaces:
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
org.bukkit.NamespacedKey
getKey()
int
hashCode()
void
setDisplay
(GlowAdvancementDisplay display) toString()
-
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
-
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
-
getKey
public org.bukkit.NamespacedKey getKey()- Specified by:
getKey
in interfaceorg.bukkit.Keyed
-
getParent
-
getCriteriaIds
-
getRequirements
-
getDisplay
-
setDisplay
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-