Fix "temporary player" issue.

This commit is contained in:
ayunami2000 2023-09-04 10:03:51 -04:00
parent 74915388bf
commit f4f9cd8fb8

View File

@ -36,6 +36,10 @@ public class PlayerListener extends PlexListener
@Override @Override
public void onPacketSending(PacketEvent event) public void onPacketSending(PacketEvent event)
{ {
if (event.isPlayerTemporary())
{
return;
}
PacketContainer packet = event.getPacket(); PacketContainer packet = event.getPacket();
byte b; byte b;
if (packet.getIntegers().getValues().get(0) == event.getPlayer().getEntityId() && (b = packet.getBytes().getValues().get(0)) >= (byte) 24 && b <= (byte) 27) if (packet.getIntegers().getValues().get(0) == event.getPlayer().getEntityId() && (b = packet.getBytes().getValues().get(0)) >= (byte) 24 && b <= (byte) 27)