Class GlowAdvancement

java.lang.Object
net.glowstone.advancement.GlowAdvancement
All Implemented Interfaces:
org.bukkit.advancement.Advancement, org.bukkit.Keyed

public class GlowAdvancement extends Object implements org.bukkit.advancement.Advancement
  • Constructor Details

    • GlowAdvancement

      public GlowAdvancement(org.bukkit.NamespacedKey key, GlowAdvancement parent)
      Creates an advancement with the default notification.
      Parameters:
      key - the namespace and name of the advancement
      parent - 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 advancement
      parent - the prerequisite advancement, or null for no prerequisite
      display - the parameters for the notification when this advancement is earned, or null for the default notification
  • Method Details

    • addCriterion

      public void addCriterion(String criterion)
      Adds a criterion.
      Parameters:
      criterion - TODO: document where this ID comes from
    • addRequirement

      public void addRequirement(List<String> criteria)
    • getCriteria

      public List<String> getCriteria()
      Specified by:
      getCriteria in interface org.bukkit.advancement.Advancement
    • encode

      public io.netty.buffer.ByteBuf encode(io.netty.buffer.ByteBuf buf) throws IOException
      Writes a notification of earning this advancement to a byte buffer.
      Parameters:
      buf - a ByteBuf
      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 interface org.bukkit.Keyed
    • getParent

      public GlowAdvancement getParent()
    • getCriteriaIds

      public List<String> getCriteriaIds()
    • getRequirements

      public List<List<String>> getRequirements()
    • getDisplay

      public GlowAdvancementDisplay getDisplay()
    • setDisplay

      public void setDisplay(GlowAdvancementDisplay display)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object