Don't use broken CB methods ...

This commit is contained in:
snowleo 2012-12-20 16:07:18 +01:00
parent be29a373ab
commit f125ac3b4a

View File

@ -16,7 +16,7 @@ public final class InventoryWorkaround
{
}
public static int firstPartial(final Inventory inventory, final ItemStack item, final int maxAmount)
private static int firstPartial(final Inventory inventory, final ItemStack item, final int maxAmount)
{
if (item == null)
{
@ -38,9 +38,9 @@ public final class InventoryWorkaround
{
final Inventory fakeInventory = Bukkit.getServer().createInventory(null, inventory.getType());
fakeInventory.setContents(inventory.getContents());
if (fakeInventory.addItem(items).isEmpty())
if (addItems(fakeInventory, items).isEmpty())
{
inventory.addItem(items);
addItems(inventory, items);
return true;
}
return false;