From 070755ba8e1294323c1359164e49b44a8815a784 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sun, 8 Oct 2023 20:19:12 +0300 Subject: [PATCH] player will not be able to move while sleeping --- src/Player.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Player.php b/src/Player.php index bf9c2ef1..ef4999bc 100755 --- a/src/Player.php +++ b/src/Player.php @@ -1504,11 +1504,10 @@ class Player{ } break; case ProtocolInfo::MOVE_PLAYER_PACKET: - if($this->spawned === false){ break; } - + if($this->isSleeping) break; if(($this->entity instanceof Entity) and $packet->messageIndex > $this->lastMovement){ $this->lastMovement = $packet->messageIndex; $newPos = new Vector3($packet->x, $packet->y, $packet->z);