mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 11:45:30 +00:00
Fixed server crash when two players sleep together
This commit is contained in:
parent
28afadce0a
commit
7f15b27ff0
@ -295,7 +295,7 @@ class Player{
|
||||
public function sleepOn(Vector3 $pos){
|
||||
foreach($this->server->api->player->getAll($this->level) as $p){
|
||||
if($p->isSleeping instanceof Vector3){
|
||||
if($p->distance($pos) <= 0.1){
|
||||
if($pos->distance($p->isSleeping) <= 0.1){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user