EssentialsX

EssentialsX

2M Downloads

[Feature Request] Max enchant level permission(s)/config setting

leasoncre opened this issue ยท 1 comments

commented

Feature request

Feature description

Add a config setting and/or configurable permission node(s) to specify a max level of unsafe enchantments:
config ex:

#This defines the maximum level that will be allowed to be applied 
#to any enchantment if unsafe enchantments is enabled. 
#This affects ALL enchantments.
allow-unsafe-enchants-max-level: 10

[[if the developers should be so inclined, you could generate a list of enchantments based on the game version and print them to a config file where each enchant's max could be redefined by config file as well, but i think the permission nodes would more useful overall]]

perm node ex:
essentials.enchantments.allowunsafe.<specific-enchantment>.level.<#>
essentials.enchantments.allowunsafe.all.level.10
essentials.enchantments.allowunsafe.all.level.* #OP override/ignore max (default true for OPs only? or require specifically assigning node?)

error message(s) ex: ('%placeholder value%' to be substituted in message output)

"You cannot enchant that above level %max-unsafe-#%" #example1 not allowed
"Enchantments over level %max-unsafe-#% are not allowed" #example2 not allowed
"%enchantment-attempted% cannot be greater than %max-unsafe-enchant-attempted-#%" #specific enchantment setting different from global/config

How the feature is useful

Allows configurable restrictions on enchantments be it globally (config), or via permissions (set in a group's permissions)
ex: using looting 1000 could crash a server, but having this restriction ability (config/global) would prevent that while still allowing for more OP enchantments than vanilla provides.
You want to ensure your staff can't over-do it by setting various levels of restrictions to different admin groups/users.

commented

Eh, upon thinking about this more I don't feel like this makes much sense. You should probably get another enchantment plugin if you want custom / increased enchantments. The UI in minecraft doesn't even work past 10, so it's not really that important to support a couple more levels. In addition, "unsafe" does imply that the permission is meant to be used to grant any enchantment level. Having a cap on "unsafe" to make it "safe" defeats the purpose, and is kind of backwards in design.