Fix variable not being used

This commit is contained in:
libraryaddict 2025-01-06 01:05:24 +13:00
parent fc589b5497
commit 3a26a5b487

View File

@ -24,7 +24,6 @@ import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerSp
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerSpawnPainting; import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerSpawnPainting;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerSpawnPlayer; import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerSpawnPlayer;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerUpdateAttributes; import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerUpdateAttributes;
import io.github.retrooper.packetevents.util.SpigotConversionUtil;
import me.libraryaddict.disguise.DisguiseAPI; import me.libraryaddict.disguise.DisguiseAPI;
import me.libraryaddict.disguise.DisguiseConfig; import me.libraryaddict.disguise.DisguiseConfig;
import me.libraryaddict.disguise.LibsDisguises; import me.libraryaddict.disguise.LibsDisguises;
@ -400,12 +399,11 @@ public class PacketHandlerSpawn implements IPacketHandler {
new com.github.retrooper.packetevents.protocol.world.Location(loc.getX(), loc.getY(), loc.getZ(), pitch, yaw); new com.github.retrooper.packetevents.protocol.world.Location(loc.getX(), loc.getY(), loc.getZ(), pitch, yaw);
if (NmsVersion.v1_19_R1.isSupported()) { if (NmsVersion.v1_19_R1.isSupported()) {
spawnEntity = spawnEntity = new WrapperPlayServerSpawnEntity(entityId, disguise.getUUID(), entityType, location, yaw, 0,
new WrapperPlayServerSpawnEntity(entityId, disguise.getUUID(), entityType, SpigotConversionUtil.fromBukkitLocation(loc), new Vector3d(vec.getX(), vec.getY(), vec.getZ()));
yaw, 0, new Vector3d(vec.getX(), vec.getY(), vec.getZ()));
} else { } else {
spawnEntity = new WrapperPlayServerSpawnLivingEntity(entityId, disguise.getUUID(), entityType, spawnEntity = new WrapperPlayServerSpawnLivingEntity(entityId, disguise.getUUID(), entityType, location, pitch,
SpigotConversionUtil.fromBukkitLocation(loc), pitch, new Vector3d(vec.getX(), vec.getY(), vec.getZ()), new ArrayList<>()); new Vector3d(vec.getX(), vec.getY(), vec.getZ()), new ArrayList<>());
} }
packets.addPacket(spawnEntity); packets.addPacket(spawnEntity);