mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
Changes to /sell /give and /item
Material.getMaxStackSize() will now be used in /give and /item The config option default-stack-size has been removed New config option oversized-stacksize and permission essentials.oversizedstacks Fixes bug giving out too many items on /give and /item when a stacksize > 64 is given. Fixes bug in /sell that ignores enchantments /sell now uses Material.getMaxStackSize() for /sell egg 2s (will sell 32 instead of 128 now)
This commit is contained in:
parent
0354b8d019
commit
9acc7db06f
8 changed files with 33 additions and 18 deletions
|
@ -72,7 +72,11 @@ public class Commanditem extends EssentialsCommand
|
|||
|
||||
final String displayName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
|
||||
user.sendMessage(_("itemSpawn", stack.getAmount(), displayName));
|
||||
InventoryWorkaround.addItem(user.getInventory(), true, true, stack);
|
||||
if (user.isAuthorized("essentials.oversizedstacks")) {
|
||||
InventoryWorkaround.addItem(user.getInventory(), true, ess.getSettings().getOversizedStackSize(), stack);
|
||||
} else {
|
||||
InventoryWorkaround.addItem(user.getInventory(), true, stack);
|
||||
}
|
||||
user.updateInventory();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue