fixed spam when switching gm to survival, fixed flykick after death

This commit is contained in:
GameHerobrine 2024-11-24 23:27:14 +03:00
parent dc0fdbf4ae
commit 2091dd1a98
2 changed files with 2 additions and 1 deletions

View file

@ -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;

View file

@ -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;