mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-09 20:41:23 +01:00
Don't use broken CB methods ...
This commit is contained in:
parent
3ac6cc11e3
commit
dc13f46ff1
@ -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