NullValkyrie

Minecraft 1.19 multipurpose plugin for spigot servers with a lot of features where most modern servers have.
git clone https://codeberg.org/night0721/NullValkyrie
Log | Files | Refs | README | LICENSE

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 }