mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 08:35:44 +01:00
Don't use broken CB methods ...
This commit is contained in:
parent
be29a373ab
commit
f125ac3b4a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user