Class AdvancementsPacket

java.lang.Object
eu.endercentral.crazy_advancements.packet.AdvancementsPacket
Direct Known Subclasses:
VisibilityAdvancementsPacket

public class AdvancementsPacket extends Object
Represents an Advancements Packet
Author:
Axel
  • Constructor Details

    • AdvancementsPacket

      public AdvancementsPacket(Player player, boolean reset, List<Advancement> advancements, List<NameKey> removedAdvancements)
      Constructor for creating Advancement Packets
      Parameters:
      player - The target Player
      reset - Whether the Client will clear the Advancement Screen before adding the Advancements
      advancements - A list of advancements that should be added to the Advancement Screen
      removedAdvancements - A list of NameKeys which should be removed from the Advancement Screen
  • Method Details

    • getPlayer

      public Player getPlayer()
      Gets the target Player
      Returns:
      The target Player
    • isReset

      public boolean isReset()
      Gets whether the Client will clear the Advancement Screen before adding the Advancements
      Returns:
      Whether the Screen should reset
    • getAdvancements

      public List<Advancement> getAdvancements()
      Gets a copy of the list of the added Advancements
      Returns:
      The list containing the added Advancements
    • getRemovedAdvancements

      public List<NameKey> getRemovedAdvancements()
      Gets a copy of the list of the removed Advancement's NameKeys
      Returns:
      The list containing the removed Advancement's NameKeys
    • build

      public net.minecraft.network.protocol.game.PacketPlayOutAdvancements build()
      Builds a packet that can be sent to a Player
      Returns:
      The Packet
    • send

      public void send()
      Sends the Packet to the target Player