Files
GeyserModelEngine/src/main/java/re/imc/geysermodelengine/packet/EntityDestroyPacket.java
2024-07-07 02:46:46 +08:00

23 lines
579 B
Java

package re.imc.geysermodelengine.packet;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.events.PacketContainer;
import java.util.Collections;
public class EntityDestroyPacket implements WrapperPacket {
private final int id;
public EntityDestroyPacket(int id) {
this.id = id;
}
@Override
public PacketContainer encode() {
PacketContainer packet = new PacketContainer(PacketType.Play.Server.ENTITY_DESTROY);
packet.getIntLists().write(0, Collections.singletonList(this.id));
return packet;
}
}