mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-07 05:28:03 +02:00
Remove ID-based permission checks in /more
This commit is contained in:
parent
79bc34047b
commit
3353061e76
@ -21,13 +21,11 @@ public class Commandmore extends EssentialsCommand {
|
||||
throw new Exception(tl("cantSpawnItem", "Air"));
|
||||
}
|
||||
|
||||
int itemId = ess.getItemDb().getLegacyId(stack.getType());
|
||||
|
||||
if (stack.getAmount() >= ((user.isAuthorized("essentials.oversizedstacks")) ? ess.getSettings().getOversizedStackSize() : stack.getMaxStackSize())) {
|
||||
throw new Exception(tl("fullStack"));
|
||||
}
|
||||
final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
|
||||
if (ess.getSettings().permissionBasedItemSpawn() ? (!user.isAuthorized("essentials.itemspawn.item-all") && !user.isAuthorized("essentials.itemspawn.item-" + itemname) && !user.isAuthorized("essentials.itemspawn.item-" + itemId)) : (!user.isAuthorized("essentials.itemspawn.exempt") && !user.canSpawnItem(stack.getType()))) {
|
||||
if (ess.getSettings().permissionBasedItemSpawn() ? (!user.isAuthorized("essentials.itemspawn.item-all") && !user.isAuthorized("essentials.itemspawn.item-" + itemname)) : (!user.isAuthorized("essentials.itemspawn.exempt") && !user.canSpawnItem(stack.getType()))) {
|
||||
throw new Exception(tl("cantSpawnItem", itemname));
|
||||
}
|
||||
if (user.isAuthorized("essentials.oversizedstacks")) {
|
||||
|
Loading…
Reference in New Issue
Block a user