mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-19 10:03:09 +00: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
22f9b76d77
commit
70e72d7744
1 changed files with 3 additions and 0 deletions
|
@ -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…
Reference in a new issue