mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Bed::setOccupied() no longer sets itself into the world
setting itself into the world is very annoying when trying to simply set up a blockstate.
This commit is contained in:
@ -954,6 +954,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
|
||||
if($b instanceof Bed){
|
||||
$b->setOccupied();
|
||||
$this->getWorld()->setBlock($pos, $b);
|
||||
}
|
||||
|
||||
$this->sleeping = $pos;
|
||||
@ -970,6 +971,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
$b = $this->getWorld()->getBlock($this->sleeping);
|
||||
if($b instanceof Bed){
|
||||
$b->setOccupied(false);
|
||||
$this->getWorld()->setBlock($this->sleeping, $b);
|
||||
}
|
||||
(new PlayerBedLeaveEvent($this, $b))->call();
|
||||
|
||||
|
Reference in New Issue
Block a user