Home›Java›Mods›Simple Item / Enchantment Cap
Simple Item / Enchantment Cap
ModsJava

Simple Item / Enchantment Cap

by alsoJoe · on Modrinth

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.

⬇ Download on Modrinth

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.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more