mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
Fixed server crash when two players sleep together
This commit is contained in:
parent
28afadce0a
commit
7f15b27ff0
1 changed files with 1 additions and 1 deletions
|
|
@ -295,7 +295,7 @@ class Player{
|
||||||
public function sleepOn(Vector3 $pos){
|
public function sleepOn(Vector3 $pos){
|
||||||
foreach($this->server->api->player->getAll($this->level) as $p){
|
foreach($this->server->api->player->getAll($this->level) as $p){
|
||||||
if($p->isSleeping instanceof Vector3){
|
if($p->isSleeping instanceof Vector3){
|
||||||
if($p->distance($pos) <= 0.1){
|
if($pos->distance($p->isSleeping) <= 0.1){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue