summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/net/ess3/commands/Commandunlimited.java5
-rw-r--r--Essentials/src/net/ess3/user/User.java4
2 files changed, 5 insertions, 4 deletions
diff --git a/Essentials/src/net/ess3/commands/Commandunlimited.java b/Essentials/src/net/ess3/commands/Commandunlimited.java
index a1d978728..c33c7ec6b 100644
--- a/Essentials/src/net/ess3/commands/Commandunlimited.java
+++ b/Essentials/src/net/ess3/commands/Commandunlimited.java
@@ -90,9 +90,10 @@ public class Commandunlimited extends EssentialsCommand
{
message = "enableUnlimited";
enableUnlimited = true;
- if (!InventoryWorkaround.containsItem(target.getPlayer().getInventory(), true, true, stack))
+
+ if (!target.getPlayer().getInventory().contains(stack))
{
- InventoryWorkaround.addItem(target.getPlayer().getInventory(), false, stack);
+ InventoryWorkaround.addItems(target.getPlayer().getInventory(), stack);
}
}
diff --git a/Essentials/src/net/ess3/user/User.java b/Essentials/src/net/ess3/user/User.java
index e3523c7fd..b21a00cf6 100644
--- a/Essentials/src/net/ess3/user/User.java
+++ b/Essentials/src/net/ess3/user/User.java
@@ -542,11 +542,11 @@ public class User extends UserBase implements IUser
final ISettings settings = ess.getSettings();
int oversizedStackSize = settings.getData().getGeneral().getOversizedStacksize();
- overfilled = InventoryWorkaround.addItem(getPlayer().getInventory(), true, oversizedStackSize, itemStack);
+ overfilled = InventoryWorkaround.addOversizedItems(getPlayer().getInventory(), oversizedStackSize, itemStack);
}
else
{
- overfilled = InventoryWorkaround.addItem(getPlayer().getInventory(), true, itemStack);
+ overfilled = InventoryWorkaround.addItems(getPlayer().getInventory(), itemStack);
}
if (canSpew)
{