mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Bed: fixed recursion when setting state to something it already is
fixes #2236
This commit is contained in:
parent
2e6afa54c2
commit
31c187f366
@ -85,7 +85,7 @@ class Bed extends Transparent{
|
|||||||
|
|
||||||
$this->getLevel()->setBlock($this, $this, false, false);
|
$this->getLevel()->setBlock($this, $this, false, false);
|
||||||
|
|
||||||
if(($other = $this->getOtherHalf()) !== null and !$other->isOccupied()){
|
if(($other = $this->getOtherHalf()) !== null and $other->isOccupied() !== $occupied){
|
||||||
$other->setOccupied($occupied);
|
$other->setOccupied($occupied);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user