diff options
author | snowleo <schneeleo@gmail.com> | 2011-07-23 01:03:45 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-07-23 01:03:45 +0200 |
commit | 7001798874801166f04b074b1c8277ae328a2e14 (patch) | |
tree | bd442106a93f40e77c8f540b9d087297f81ef5aa | |
parent | 40a2bccf2dbeb84b19e601bd47cfb3fa88951e37 (diff) | |
download | Essentials-7001798874801166f04b074b1c8277ae328a2e14.tar Essentials-7001798874801166f04b074b1c8277ae328a2e14.tar.gz Essentials-7001798874801166f04b074b1c8277ae328a2e14.tar.lz Essentials-7001798874801166f04b074b1c8277ae328a2e14.tar.xz Essentials-7001798874801166f04b074b1c8277ae328a2e14.zip |
Don't give out a full stack on /unlimited, instead either 2 or 1, if the max stack size is 1
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java | 2 |
1 files changed, 1 insertions, 1 deletions
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") |