Fix isItemValidForSlot not checking canEquip

This commit is contained in:
copygirl committed 2014-04-07 18:35:18 +02:00
1 parent bc1a910efd
commit 517641573b
1 file changed
+3 -2
@@ -172,7 +172,8 @@ public class InventoryBaubles implements IInventory {
*/
@Override
public boolean isItemValidForSlot(int i, ItemStack stack) {
if (stack == null || !(stack.getItem() instanceof IBauble))
if (stack == null || !(stack.getItem() instanceof IBauble)
|| !((IBauble) stack.getItem()).canEquip(stack, player.get()))
return false;
if (i == 0
&& ((IBauble) stack.getItem()).getBaubleType(stack) == BaubleType.AMULET)
@@ -222,4 +223,4 @@ public class InventoryBaubles implements IInventory {
}
}
}
}
}