Fixed not being able to wear armour

This commit is contained in:
Dylan K. Taylor
2017-11-29 19:51:38 +00:00
parent 2cb81b5f8d
commit e94db980d7
3 changed files with 13 additions and 1 deletions

View File

@ -77,7 +77,7 @@ class SlotChangeAction extends InventoryAction{
public function isValid(Player $source) : bool{
return (
$this->inventorySlot >= 0 and
$this->inventorySlot < $this->inventory->getSize() and
$this->inventory->slotExists($this->inventorySlot) and
$this->inventory->getItem($this->inventorySlot)->equalsExact($this->sourceItem)
);
}