From 5237867319ad04c7902c65db05d928cdd5e0b03f Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Thu, 4 Jul 2013 21:48:35 +0200 Subject: [PATCH] Fixed Armor AIR crash --- src/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Player.php b/src/Player.php index ac0a22bb..7e79e2fc 100644 --- a/src/Player.php +++ b/src/Player.php @@ -1703,7 +1703,7 @@ class Player{ ); $armor = array(); for($i = 0; $i < 4; ++$i){ - if(isset($this->armor[$i]) and ($this->armor[$i] instanceof Item)){ + if(isset($this->armor[$i]) and ($this->armor[$i] instanceof Item) and $this->armor[$i]->getID() > AIR){ $data["slot$i"] = $this->armor[$i]->getID() !== AIR ? $this->armor[$i]->getID() - 256:0; }else{ $this->armor[$i] = BlockAPI::getItem(AIR, 0, 0);