PacketPlayOutEntityMetadata.java (639B)
1 package me.night.nullvalkyrie.packets.protocol; 2 3 import net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket; 4 import net.minecraft.network.syncher.SynchedEntityData; 5 import net.minecraft.world.entity.Entity; 6 import org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer; 7 import org.bukkit.entity.Player; 8 9 public class PacketPlayOutEntityMetadata implements Packet { 10 public PacketPlayOutEntityMetadata(Player player, Entity entity, SynchedEntityData entityData) { 11 ((CraftPlayer) player).getHandle().connection.send(new ClientboundSetEntityDataPacket(entity.getBukkitEntity().getEntityId(), entityData, true)); 12 } 13 }