mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-14 04:01:59 +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)
|
if (item == null)
|
||||||
{
|
{
|
||||||
@ -38,9 +38,9 @@ public final class InventoryWorkaround
|
|||||||
{
|
{
|
||||||
final Inventory fakeInventory = Bukkit.getServer().createInventory(null, inventory.getType());
|
final Inventory fakeInventory = Bukkit.getServer().createInventory(null, inventory.getType());
|
||||||
fakeInventory.setContents(inventory.getContents());
|
fakeInventory.setContents(inventory.getContents());
|
||||||
if (fakeInventory.addItem(items).isEmpty())
|
if (addItems(fakeInventory, items).isEmpty())
|
||||||
{
|
{
|
||||||
inventory.addItem(items);
|
addItems(inventory, items);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user