diff --git a/src/Player.php b/src/Player.php index 2f0217fd..61f512bc 100755 --- a/src/Player.php +++ b/src/Player.php @@ -1087,6 +1087,7 @@ class Player{ foreach($this->inventory as $slot => $item){ $inv[$slot] = BlockAPI::getItem(AIR, 0, 0); } + $this->hotbar = [0, 1, 2, 3, 4, 5, 6, 7, 8]; $this->lastCorrect = $this->entity->copy(); $this->blocked = true; $this->gamemode = $gm; diff --git a/src/entity/Entity.php b/src/entity/Entity.php index ee68991c..1b640119 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -821,7 +821,7 @@ class Entity extends Position } } - if($prevGroundState == $this->onGround && !$this->onGround && $this->player->isSleeping == false){ //isSleeping may be a vector + if($prevGroundState == $this->onGround && !$this->onGround && $this->player->isSleeping == false && !$this->dead){ //isSleeping may be a vector ++$this->notOnGroundTicks; }else if($this->onGround){ $this->notOnGroundTicks = 0;