A Spigot/Paper plugin that limits or blocks specific items in ender chests, chests, shulker boxes, bundles and other containers. It works with vanilla items, groups of items, and custom items from other plugins.
- Separate limits for each container type, including what can go inside bundles, item frames, decorated pots and shelves
- Limit or block items: set a maximum per container, or
0to block an item completely - Partial placing: if you try to put in more than is allowed, as many as fit go in and the rest stays with you
- Item groups: one entry can cover every color of wool, every shulker box, and so on
- Custom items from other plugins, recognised by their hidden plugin tag, so renaming doesn't get around it
- Hard to get around: covers shift-clicks, number keys, dragging, hoppers, items hidden inside shulker boxes and bundles, pre-filled shulker boxes and double chests
- Download the jar from Releases and put it in your server's
plugins/folder. - Restart the server.
plugins/ContainerLimit/config.ymlis created. - Set up your limits (see below) and run
/climit reload.
Limits go under containers:. Each container type gets its own list of item: limit entries:
containers:
ENDER_CHEST: # container type
ELYTRA: 1 # at most 1 elytra per ender chest
TOTEM_OF_UNDYING: 0 # 0 = blocked
CHEST:
WOOL: 64 # at most 64 wool in total, any colors
BUNDLE:
ENDER_PEARL: 8 # at most 8 pearls inside each bundleA limit counts the item across all slots of one container. A double chest counts as one container.
| Key | Covers |
|---|---|
ENDER_CHEST |
Ender chests |
CHEST |
Chests, trapped chests, double chests, chest minecarts and boats |
BARREL, SHULKER_BOX, DISPENSER, DROPPER, CRAFTER |
The placed blocks |
HOPPER |
Hoppers and hopper minecarts |
FURNACE, BLAST_FURNACE, SMOKER, BREWING |
The placed blocks |
DECORATED_POT |
Decorated pots |
SHELF |
All wood types of shelves (1.21.9+) |
ITEM_FRAME |
Item frames and glow item frames |
BUNDLE |
What can go inside each bundle |
| Example | Matches |
|---|---|
ELYTRA |
One item (material names) |
WOOL |
A Minecraft tag, e.g. WOOL, BEDS, BANNERS, LOGS |
'*_WOOL' |
A wildcard over item names, in quotes |
'custom:plugin:tag=value' |
A custom item from another plugin, in quotes |
- Tags and wildcards share one limit:
WOOL: 64means 64 wool in total, not 64 of each color. - Overlapping entries all apply:
WOOL: 64plusRED_WOOL: 0allows up to 64 wool of any color except red.
- Hold the custom item and run
/climit hand. - It lists the item's plugin tags as ready-made config lines. Click one to copy it.
- Paste it under a container and run
/climit reload.
ENDER_CHEST:
'custom:someplugin:item_type=example': 0 # tag has exactly this value
'custom:someplugin:item_id': 5 # tag exists, any valuePick a tag that's the same on every copy of the item, like an item ID or type. A custom item never counts as its base item. If /climit hand finds no plugin tags, the item can only be limited by its item type.
# Count items inside shulker boxes and bundles, so blocked items can't be hidden in them
count-container-contents: true
# Skip other plugins' menus (e.g. a shop GUI that looks like a chest)
ignore-plugin-inventories: true
# Chat messages, & color codes work.
# Placeholders: {item}, {limit}, {container}
messages:
prefix: "&8[&5ContainerLimit&8] "
blocked: "&c{item} is not allowed in this {container}."
limit: "&cYou can only store {limit}x {item} in one {container}."If there's a mistake in the config, /climit reload shows it in chat and keeps the old settings.
| Command | Description |
|---|---|
/climit reload |
Reload the config and show any errors |
/climit list |
Show all limits |
/climit hand |
Show the plugin tags on your held item |
/containerlimit works too.
| Permission | Description | Default |
|---|---|---|
containerlimit.admin |
Use the commands | op |
containerlimit.bypass |
Ignore all limits | nobody |
containerlimit.bypass.<type> |
Ignore limits for one container type, e.g. containerlimit.bypass.chest |
nobody |
- Items already stored: items that were in a container before a limit was added stay there. Only new items are blocked.
- Creative mode: the creative inventory isn't checked, because creative players can spawn any item anyway.
- Bundles: items go into a bundle all at once or not at all.
Minecraft 1.18 – 1.21.x on Spigot, Paper and Paper forks (Purpur, Pufferfish, …), with Java 17+. Folia isn't supported.