Class ToastPacket
java.lang.Object
eu.endercentral.crazy_advancements.packet.ToastPacket
Represents an Advancements Packet for Toast Notifications
- Author:
- Axel
-
Constructor Summary
ConstructorDescriptionToastPacket
(Player player, boolean add, ToastNotification notification) Constructor for creating Toast Packets -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.protocol.game.PacketPlayOutAdvancements
build()
Builds a packet that can be sent to a PlayerGets the NotificationGets the target Playerboolean
isAdd()
Gets whether the Advancement is added or removedvoid
send()
Sends the Packet to the target Player
-
Constructor Details
-
ToastPacket
Constructor for creating Toast Packets- Parameters:
player
- The target Playeradd
- Whether to add or remove the Advancementnotification
- The Notification
-
-
Method Details
-
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
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
-