mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-12 09:35:26 +02: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:
@@ -19,6 +19,9 @@ public class InventoryWorkaround {
|
|||||||
ItemStack[] inventory = ci.getContents();
|
ItemStack[] inventory = ci.getContents();
|
||||||
for (int i = start; i < inventory.length; i++) {
|
for (int i = start; i < inventory.length; i++) {
|
||||||
ItemStack cItem = inventory[i];
|
ItemStack cItem = inventory[i];
|
||||||
|
if (cItem == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (item.getTypeId() == cItem.getTypeId() && (!forceAmount || item.getAmount() == cItem.getAmount()) && (!forceDurability || cItem.getDurability() == item.getDurability())) {
|
if (item.getTypeId() == cItem.getTypeId() && (!forceAmount || item.getAmount() == cItem.getAmount()) && (!forceDurability || cItem.getDurability() == item.getDurability())) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user