mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fix error on tapping block with air in hand
This commit is contained in:
parent
cbf1f7a2e8
commit
08c9321a55
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user