Fix error on tapping block with air in hand

This commit is contained in:
williamtdr 2014-04-03 16:40:16 -05:00
parent cbf1f7a2e8
commit 08c9321a55

View File

@ -200,7 +200,9 @@ class Human extends Creature implements ProjectileSource, InventorySource{
}
public function getCurrentEquipment(){
return $this->hotbar[$this->slot];
if($this->slot > -1) {
return $this->hotbar[$this->slot];
}
}
public function sendCurrentEquipmentSlot(Player $player){
@ -426,4 +428,4 @@ class Human extends Creature implements ProjectileSource, InventorySource{
public function getSlotCount(){
return count($this->inventory);
}
}
}