From 5bba62d2ef7ea41257266b752b462c443c248428 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 19 Apr 2022 12:10:36 +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 94af88a..4289344 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() < 64) { + if (itemStack != null && itemStack.isSimilar(item) && itemStack.getAmount() + item.getAmount() < itemStack.getMaxStackSize()) { itemStack.setAmount(itemStack.getAmount() + item.getAmount()); inventory.setItem(i, itemStack); p.updateInventory();