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 40a2bccf2d
commit 7001798874

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