diff --git a/src/de/steamwar/spectatesystem/elements/REntity.java b/src/de/steamwar/spectatesystem/elements/REntity.java index 7db0cec..dbfa6ef 100644 --- a/src/de/steamwar/spectatesystem/elements/REntity.java +++ b/src/de/steamwar/spectatesystem/elements/REntity.java @@ -22,7 +22,8 @@ package de.steamwar.spectatesystem.elements; import com.comphenix.protocol.PacketType; import com.comphenix.protocol.ProtocolLibrary; import com.comphenix.protocol.events.PacketContainer; -import com.comphenix.protocol.wrappers.WrappedDataWatcher; +import com.comphenix.protocol.utility.Util; +import com.comphenix.protocol.wrappers.WrappedWatchableObject; import de.steamwar.spectatesystem.SpectateSystem; import net.minecraft.server.v1_15_R1.*; import org.bukkit.Bukkit; @@ -110,7 +111,7 @@ public abstract class REntity { PacketContainer packet = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.ENTITY_METADATA); packet.getIntegers().write(0, entity.getId()); - packet.getDataWatcherModifier().write(0, WrappedDataWatcher.getEntityWatcher(entity.getBukkitEntity())); + packet.getWatchableCollectionModifier().write(0, Util.asList(new WrappedWatchableObject(0, (byte)0x02))); for(Player player : Bukkit.getOnlinePlayers()){ try {