sleeping will not kick for flying, check for obstructed position added

This commit is contained in:
GameHerobrine 2024-07-22 18:43:11 +03:00
parent a08e4eaf73
commit 55aa7ca2b7
3 changed files with 45 additions and 6 deletions

View file

@ -814,8 +814,7 @@ class Entity extends Position
}
}
}
if($prevGroundState == $this->onGround && !$this->onGround){
if($prevGroundState == $this->onGround && !$this->onGround && $this->player->isSleeping == false){ //isSleeping may be a vector
++$this->notOnGroundTicks;
}else if($this->onGround){
$this->notOnGroundTicks = 0;