From 7e903fde5b5538c0cfd09521a618f994f46735e0 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 10 Feb 2022 00:57:43 +0000 Subject: [PATCH] Fixed multiple players being able to sleep in the same bed --- src/block/Bed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/block/Bed.php b/src/block/Bed.php index fd566bca3..9a487aa8f 100644 --- a/src/block/Bed.php +++ b/src/block/Bed.php @@ -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); }