From 9826abd83e646a41826b5531c2ab9a1844cb4a27 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 26 Jan 2019 16:59:03 +0000 Subject: [PATCH] Stair: fixed crash if player is null --- src/pocketmine/block/Stair.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/block/Stair.php b/src/pocketmine/block/Stair.php index e45e25482..cf9328aac 100644 --- a/src/pocketmine/block/Stair.php +++ b/src/pocketmine/block/Stair.php @@ -89,7 +89,7 @@ abstract class Stair extends Transparent{ 2 => 1, 3 => 3 ]; - $this->meta = $faces[$player->getDirection()] & 0x03; + $this->meta = $player !== null ? $faces[$player->getDirection()] & 0x03 : 0; if(($clickVector->y > 0.5 and $face !== Vector3::SIDE_UP) or $face === Vector3::SIDE_DOWN){ $this->meta |= 0x04; //Upside-down stairs }