mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +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{
|
||||
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->position->getWorld()->setBlock($this->position, $this);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user