Class ToastPacket

java.lang.Object
eu.endercentral.crazy_advancements.packet.ToastPacket

public class ToastPacket extends Object
Represents an Advancements Packet for Toast Notifications
Author:
Axel
  • Constructor Details

    • ToastPacket

      public ToastPacket(Player player, boolean add, ToastNotification notification)
      Constructor for creating Toast Packets
      Parameters:
      player - The target Player
      add - Whether to add or remove the Advancement
      notification - The Notification
  • Method Details

    • getPlayer

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

      public boolean isAdd()
      Gets whether the Advancement is added or removed
      Returns:
      Whether the Advancement is added or removed
    • getNotification

      public ToastNotification getNotification()
      Gets the Notification
      Returns:
      The Notification
    • 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