Simple Item / Enchantment Cap
This plugin allows you to limit the amount of a certain item that a player may have, and/or limit the level of certain enchantments that a player may have.
📖About Simple Item / Enchantment Cap
Use Cases
This plugin is useful for SMPs or other servers with a limited kit or item bans. For example, a server that doesn't allow totems of undying could simply set their limit to 0 in config, or a server that limits protection to level 3 can do the same. A server could also set an item or enchantment limit to 0 to ban that item or enchantment.
How it Works
This plugin works by consistently checking every player's inventory for illegal items, along with checking every time the player closes a GUI, relogs, etc. If the plugin finds that the player has too many of item, it will drop the extras on the ground. If the plugin finds that an enchantment level is too high, it will automatically reduce the level of the enchantment to the maximum set by the server.
Config
Inside of the ItemCap folder, there is a simple config.yml file that allows you to change the settings of the plugin. It looks like this:
items:
TOTEM_OF_UNDYING: 1
enchantments:
SHARPNESS: 4
In this example, players are only allowed to carry 1 totem of undying at a time, and their swords and axes cannot be enchanted with anything higher than sharpness 4. To add limited items or enchantments, just make a new line under the section in which you want to add a limit and type the name of the item or enchantment in all capital letters along witht the maximum number in the same format as seen in the example.