1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-10 08:34:17 +02:00

Don't give out a full stack on /unlimited, instead either 2 or 1, if the max stack size is 1

This commit is contained in:
snowleo
2011-07-23 01:03:45 +02:00
parent 26fec73328
commit d427acbd15

View File

@@ -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")