Class AdvancementsPacket
java.lang.Object
eu.endercentral.crazy_advancements.packet.AdvancementsPacket
- Direct Known Subclasses:
VisibilityAdvancementsPacket
Represents an Advancements Packet
- Author:
- Axel
-
Constructor Summary
ConstructorDescriptionAdvancementsPacket
(Player player, boolean reset, List<Advancement> advancements, List<NameKey> removedAdvancements) Constructor for creating Advancement Packets -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.protocol.game.PacketPlayOutAdvancements
build()
Builds a packet that can be sent to a PlayerGets a copy of the list of the added AdvancementsGets the target PlayerGets a copy of the list of the removed Advancement's NameKeysboolean
isReset()
Gets whether the Client will clear the Advancement Screen before adding the Advancementsvoid
send()
Sends the Packet to the target Player
-
Constructor Details
-
AdvancementsPacket
public AdvancementsPacket(Player player, boolean reset, List<Advancement> advancements, List<NameKey> removedAdvancements) Constructor for creating Advancement Packets- Parameters:
player
- The target Playerreset
- Whether the Client will clear the Advancement Screen before adding the Advancementsadvancements
- A list of advancements that should be added to the Advancement ScreenremovedAdvancements
- A list of NameKeys which should be removed from the Advancement Screen
-
-
Method Details
-
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
Gets a copy of the list of the added Advancements- Returns:
- The list containing the added Advancements
-
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
-