mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-14 18:44:48 +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:
@@ -56,7 +56,7 @@ public class Commandunlimited extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
final ItemStack stack = ess.getItemDb().get(args[0], 1);
|
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("_", "");
|
String itemname = stack.getType().toString().toLowerCase().replace("_", "");
|
||||||
if (!user.isAuthorized("essentials.unlimited.item-all")
|
if (!user.isAuthorized("essentials.unlimited.item-all")
|
||||||
|
Reference in New Issue
Block a user