From dcdd49224b4e6bb1134df24ca2681e335143e67e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 19 Apr 2022 13:01:16 +0200 Subject: [PATCH] Update MWTeam.givePlayerItem Add SlowMoScript and needed utils --- src/de/steamwar/misslewars/MWTeam.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/steamwar/misslewars/MWTeam.java b/src/de/steamwar/misslewars/MWTeam.java index 4289344..cf59dea 100644 --- a/src/de/steamwar/misslewars/MWTeam.java +++ b/src/de/steamwar/misslewars/MWTeam.java @@ -94,7 +94,7 @@ public class MWTeam { Inventory inventory = p.getInventory(); for (int i = 0; i <= 35; i++) { //35 is the last normal inventory slot ItemStack itemStack = inventory.getItem(i); - if (itemStack != null && itemStack.isSimilar(item) && itemStack.getAmount() + item.getAmount() < itemStack.getMaxStackSize()) { + if (itemStack != null && itemStack.isSimilar(item) && itemStack.getAmount() + item.getAmount() <= itemStack.getMaxStackSize()) { itemStack.setAmount(itemStack.getAmount() + item.getAmount()); inventory.setItem(i, itemStack); p.updateInventory();