From d427acbd157847cb548f4e36d94666ea4a66c7ae Mon Sep 17 00:00:00 2001 From: snowleo Date: Sat, 23 Jul 2011 01:03:45 +0200 Subject: Don't give out a full stack on /unlimited, instead either 2 or 1, if the max stack size is 1 --- Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java b/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java index cc8c7e128..3c79df4cb 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java @@ -56,7 +56,7 @@ public class Commandunlimited extends EssentialsCommand } final ItemStack stack = ess.getItemDb().get(args[0], 1); - stack.setAmount(stack.getType().getMaxStackSize()); + stack.setAmount(Math.min(stack.getType().getMaxStackSize(), 2)); String itemname = stack.getType().toString().toLowerCase().replace("_", ""); if (!user.isAuthorized("essentials.unlimited.item-all") -- cgit v1.2.3