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)
* @param includeSelf
*/
@Override
@ApiStatus.Internal
protected void synchronizePosition(boolean includeSelf) {
final PlayerPositionAndLookPacket positionAndLookPacket = new PlayerPositionAndLookPacket();
positionAndLookPacket.position = position.clone();
positionAndLookPacket.flags = 0x00;
positionAndLookPacket.teleportId = teleportId.incrementAndGet();
playerConnection.sendPacket(positionAndLookPacket);
if (includeSelf) {
final PlayerPositionAndLookPacket positionAndLookPacket = new PlayerPositionAndLookPacket();
positionAndLookPacket.position = position.clone();
positionAndLookPacket.flags = 0x00;
positionAndLookPacket.teleportId = teleportId.incrementAndGet();
playerConnection.sendPacket(positionAndLookPacket);
}
super.synchronizePosition(includeSelf);
}