mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 10:01:53 +00:00
Fixed multiple players being able to sleep in the same bed
This commit is contained in:
parent
4f44a067b0
commit
7e903fde5b
@ -166,7 +166,7 @@ class Bed extends Transparent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onNearbyBlockChange() : void{
|
public function onNearbyBlockChange() : void{
|
||||||
if(($other = $this->getOtherHalf()) !== null && $other->occupied !== $this->occupied){
|
if(!$this->head && ($other = $this->getOtherHalf()) !== null && $other->occupied !== $this->occupied){
|
||||||
$this->occupied = $other->occupied;
|
$this->occupied = $other->occupied;
|
||||||
$this->position->getWorld()->setBlock($this->position, $this);
|
$this->position->getWorld()->setBlock($this->position, $this);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user