Include the check

This commit is contained in:
Németh Noel 2021-05-15 21:11:48 +02:00
parent e3d31f113a
commit 3081ffbb00

View File

@ -1985,16 +1985,17 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
/** /**
* @see Entity#synchronizePosition(boolean) * @see Entity#synchronizePosition(boolean)
* @param includeSelf
*/ */
@Override @Override
@ApiStatus.Internal @ApiStatus.Internal
protected void synchronizePosition(boolean includeSelf) { protected void synchronizePosition(boolean includeSelf) {
final PlayerPositionAndLookPacket positionAndLookPacket = new PlayerPositionAndLookPacket(); if (includeSelf) {
positionAndLookPacket.position = position.clone(); final PlayerPositionAndLookPacket positionAndLookPacket = new PlayerPositionAndLookPacket();
positionAndLookPacket.flags = 0x00; positionAndLookPacket.position = position.clone();
positionAndLookPacket.teleportId = teleportId.incrementAndGet(); positionAndLookPacket.flags = 0x00;
playerConnection.sendPacket(positionAndLookPacket); positionAndLookPacket.teleportId = teleportId.incrementAndGet();
playerConnection.sendPacket(positionAndLookPacket);
}
super.synchronizePosition(includeSelf); super.synchronizePosition(includeSelf);
} }