mirror of
https://github.com/essentials/Essentials.git
synced 2025-02-24 08:22:56 +01:00
[trunk] empty fields in Inventory now return null instead of Material.AIR
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1157 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
0be847fba4
commit
fe298d2f58
@ -19,6 +19,9 @@ public class InventoryWorkaround {
|
||||
ItemStack[] inventory = ci.getContents();
|
||||
for (int i = start; i < inventory.length; i++) {
|
||||
ItemStack cItem = inventory[i];
|
||||
if (cItem == null) {
|
||||
continue;
|
||||
}
|
||||
if (item.getTypeId() == cItem.getTypeId() && (!forceAmount || item.getAmount() == cItem.getAmount()) && (!forceDurability || cItem.getDurability() == item.getDurability())) {
|
||||
return i;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user