13
0
Dieser Commit ist enthalten in:
Lixfel 2020-11-03 18:26:36 +01:00
Ursprung 974454b630
Commit 268eabec6a

Datei anzeigen

@ -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 {