Fix NPE in BUY signs

This commit is contained in:
snowleo 2011-10-10 11:40:20 +03:00
parent a34c92d55a
commit 02ee314ab1

View File

@ -15,6 +15,10 @@ public class FakeInventory implements Inventory
this.items = new ItemStack[items.length]; this.items = new ItemStack[items.length];
for (int i = 0; i < items.length; i++) for (int i = 0; i < items.length; i++)
{ {
if (items[i] == null)
{
continue;
}
this.items[i] = new ItemStack(items[i].getTypeId(), items[i].getAmount(), items[i].getDurability()); this.items[i] = new ItemStack(items[i].getTypeId(), items[i].getAmount(), items[i].getDurability());
} }
} }