ItemLimiter
ItemLimiter 是一款轻量级且高度可配置的 Minecraft 插件,允许服务器管理员限制玩家携带、存储、拾取、移动或合成特定物品的数量。
它通过为每种物品强制执行可配置的数量上限,帮助防止玩家囤积强力物品,例如 Totem、Ender Pearl、Golden Apple、Mace 或任何其他材料。
该插件设计为 完全可配置、轻量级 且 安全,同时防止通过容器、Bundle、合成、库存操作和物品拾取等方式绕过限制。
主要功能
库存物品上限
每个已配置的物品都可以设置 玩家可携带的最大数量。
如果玩家尝试超过该数量:
- 该操作将被 阻止
- 或者 多余的物品会自动从库存中掉落
使用示例:
- 限制 Totem 数量为 1
- 限制 Ender Pearl 数量为 16
- 限制 Golden Apple 数量为 8
可配置的物品交互行为
每个物品可以限制不同类型的交互:
| 行为 | 描述 |
|---|---|
pickup |
当达到上限时,防止玩家拾取更多该物品 |
containers |
处理与容器相关的限制,包括从容器中取出物品以及限制在支持的容器中存储的数量 |
inventory |
当会导致超出限制时,防止将物品移动到玩家的库存中 |
craft |
当玩家的库存限制会被超出时,防止合成该物品 |
global |
当玩家的终身/全局合成总量限制会被超出时,防止合成该物品 |
配置示例:
{
"TOTEM_OF_UNDYING": {
"limit": 1,
"action": ["pickup", "containers", "inventory"]
},
"ENDER_PEARL": {
"limit": 16,
"action": ["pickup"]
},
"MACE": {
"limit": 1,
"action": ["global"]
}
}
上限基于所配置的行为。基于库存的上限计算玩家库存中的物品数量(包括 Bundle 的内容,如适用)。全局上限跟踪每位玩家针对每种材料的合成总数。
独立的容器存储上限
containers 行为还可以限制在支持的容器中存储的特定物品数量。
要为同一种材料使用独立的容器存储上限,请使用 seperate 标志:
/itemlimiter add TOTEM_OF_UNDYING 0 containers seperate
这将创建一个单独的配置条目:
{
"TOTEM_OF_UNDYING": {
"limit": 1,
"action": ["pickup", "inventory"]
},
"TOTEM_OF_UNDYING#containers": {
"limit": 0,
"action": ["containers"]
}
}
这允许玩家携带 1 个 Totem,同时防止将 Totem 存储在容器中。
支持的存储容器包括:
Chests
Barrels
Shulker Boxes
Hoppers
Droppers
Dispensers
Furnaces
Smokers
Blast Furnaces
Crafters
Brewing Stands
Decorated Pots
Chiseled Bookshelves
Jukeboxes
Lecterns
Ender Chests
智能上限执行
如果玩家已经超过了上限(例如在安装插件或更改配置后),插件将自动:
- 检测多余物品
- 从玩家库存中移除它们
- 自然地掉落在地面上
这可以防止玩家利用之前持有的物品来绕过限制。
对容器友好的逻辑
除非你配置了单独的容器存储上限,否则玩家仍然可以将物品存储在容器中。
默认允许:
- 使用 Shift+点击将物品从库存放入箱子
- 将物品放入 Shulker Box
- 将物品放入 Bundle
当个人上限达到时阻止:
- 从箱子移动到库存
- 从 Bundle 移动到库存
- 从漏斗移动到库存
当容器存储上限达到时阻止:
- 向支持的容器中添加超过允许数量的物品
- 使用快捷栏键或副手交换来绕过容器限制
全局合成上限
global 行为会跟踪每位玩家在一段时间内合成已配置物品的次数。
全局合成总数持久存储在:
crafted-limits.db
你可以使用以下命令查看你的全局合成数量:
/itemlimiter globalcheck <material>
对于使用 craft 或 global 行为的物品,Crafter 方块的自动化合成功能被阻止,因为无法可靠地将自动化合成链接到玩家以进行数据库跟踪。
完全可配置
该插件使用 Bukkit 材质名称 和 JSON 配置文件。
目录结构:
plugins/ItemLimiter/
config.json
config-examples.txt
crafted-limits.db
translations/
messages.json
功能包括:
- 可编辑的消息
- 可配置的物品上限
- 每个物品可配置的行为
- 可配置的全局上限公告
- 内置文档示例
热重载支持
你可以重新加载配置文件和翻译文件,而无需重启服务器。
/itemlimiter reload
如果配置文件缺失,插件将自动重新创建它们。
命令
| 命令 | 描述 |
|---|---|
/itemlimiter help |
显示所有插件命令 |
/itemlimiter list [page] |
列出已配置的物品上限 |
/itemlimiter info <material> |
显示关于某个物品的信息 |
/itemlimiter check <material> |
显示你当前拥有的物品数量 |
/itemlimiter globalcheck <material> |
显示你某物品的全局合成数量 |
/itemlimiter add <material> <limit> <actions> [seperate] |
添加新的物品上限 |
/itemlimiter edit <material> <limit> <actions> |
编辑现有物品 |
/itemlimiter remove <material> |
移除物品上限 |
/itemlimiter reload |
重新加载插件配置 |
权限
| 权限 | 描述 | 默认值 |
|---|---|---|
itemlimiter.help |
允许使用 /itemlimiter help 命令 |
true |
itemlimiter.info |
允许使用 /itemlimiter info 命令 |
op |
itemlimiter.list |
允许使用 /itemlimiter list 命令 |
op |
itemlimiter.check |
允许使用 /itemlimiter check 命令 |
op |
itemlimiter.globalcheck |
允许使用 /itemlimiter globalcheck 命令 |
true |
itemlimiter.reload |
允许使用 /itemlimiter reload 命令 |
op |
itemlimiter.add |
允许添加新的物品限制 | op |
itemlimiter.edit |
允许编辑物品限制 | op |
itemlimiter.remove |
允许移除物品限制 | op |
itemlimiter.bypass |
绕过所有物品限制 | false |
itemlimiter.update.notify |
允许接收更新通知 | op |
为什么选择 ItemLimiter?
许多服务器面临物品囤积或堆叠问题,例如:
- 携带数十个不死图腾
- 末影珍珠过度堆叠
- 金苹果囤积
- PvP 或生存模式中的物品失衡
- 在容器内存储受限物品
ItemLimiter 提供了一种简洁且可配置的方式来平衡游戏性,同时让服务器管理员能够精确决定哪些物品需要受到限制。
兼容性
- Minecraft 1.20+
- Spigot / Paper
- 轻量级,对性能影响极小
示例用例
服务器常限制的物品包括:
TOTEM_OF_UNDYING
ENDER_PEARL
ELYTRA
MACE
GOLDEN_APPLE
ENCHANTED_GOLDEN_APPLE
SHIELD
TRIDENT
配置理念
ItemLimiter 的设计目标是:
- 简单
- 灵活
- 对服务器友好
你可以决定哪些物品、多少玩家能携带或存储,以及哪些交互行为受到限制。
支持
如果你遇到问题或有功能建议,欢迎在 Discord 服务器中提交工单。
享受为你服务器打造的平衡且可控的物品库存系统。
ItemLimiter
ItemLimiter is a lightweight and highly configurable Minecraft plugin that allows server owners to limit how many of a specific item a player can carry, store, pick up, move, or craft.
It helps prevent players from hoarding powerful items such as Totems, Ender Pearls, Golden Apples, Maces, or any other material by enforcing configurable limits per item.
The plugin is designed to be fully configurable, lightweight, and safe, while preventing bypasses through containers, bundles, crafting, inventory manipulation, and item pickups.
Key Features
Inventory Item Limits
Each configured item can have a maximum amount that a player may carry.
If a player attempts to exceed that amount:
- the action will be blocked
- or the excess items will automatically drop from their inventory
Example use cases:
- Limit Totems to 1
- Limit Ender Pearls to 16
- Limit Golden Apples to 8
Configurable Item Actions
Each item can restrict different types of interactions:
| Action | Description |
|---|---|
pickup |
Prevents players from picking up more of an item when the limit is reached |
containers |
Handles container-related limits, including taking items from containers and limiting how many can be stored in supported containers |
inventory |
Prevents moving items into the player's inventory when the limit would be exceeded |
craft |
Prevents crafting items if the player's inventory limit would be exceeded |
global |
Prevents crafting items if the player's lifetime/global crafted limit would be exceeded |
Example config:
{
"TOTEM_OF_UNDYING": {
"limit": 1,
"action": ["pickup", "containers", "inventory"]
},
"ENDER_PEARL": {
"limit": 16,
"action": ["pickup"]
},
"MACE": {
"limit": 1,
"action": ["global"]
}
}
Limits are based on the configured action. Inventory-based limits count items in the player's inventory, including bundle contents where applicable. Global limits track crafted totals per player and material.
Separate Container Storage Limits
The containers action can also limit how many of an item may be stored inside supported containers.
To use a separate storage-container limit for the same material, use the seperate flag:
/itemlimiter add TOTEM_OF_UNDYING 0 containers seperate
This creates a separate config entry:
{
"TOTEM_OF_UNDYING": {
"limit": 1,
"action": ["pickup", "inventory"]
},
"TOTEM_OF_UNDYING#containers": {
"limit": 0,
"action": ["containers"]
}
}
This allows players to carry 1 Totem while preventing Totems from being stored in containers.
Supported storage containers include:
Chests
Barrels
Shulker Boxes
Hoppers
Droppers
Dispensers
Furnaces
Smokers
Blast Furnaces
Crafters
Brewing Stands
Decorated Pots
Chiseled Bookshelves
Jukeboxes
Lecterns
Ender Chests
Smart Limit Enforcement
If a player already exceeds a limit, for example after plugin installation or configuration changes, the plugin will automatically:
- Detect the excess items
- Remove them from the player's inventory
- Drop them naturally on the ground
This prevents players from bypassing limits with previously held items.
Container-Friendly Logic
Players can still store items in containers unless you configure a separate container storage limit.
Allowed by default:
- Inventory to chest using shift-click
- Inventory to shulker boxes
- Inventory to bundles
Blocked when a personal limit is reached:
- Chest to inventory
- Bundle to inventory
- Hopper to inventory
Blocked when a container storage limit is reached:
- Adding more than the allowed amount into supported containers
- Using hotbar keys or offhand swaps to bypass container limits
Global Craft Limits
The global action tracks how many times each player has crafted a configured item over time.
Global craft totals are stored persistently in:
crafted-limits.db
You can check your global crafted amount with:
/itemlimiter globalcheck <material>
Crafter block crafting is blocked for items using craft or global, because automated crafting cannot be reliably linked to a player for database tracking.
Fully Configurable
The plugin uses Bukkit material names and JSON configuration.
Structure:
plugins/ItemLimiter/
config.json
config-examples.txt
crafted-limits.db
translations/
messages.json
Features include:
- Editable messages
- Configurable item limits
- Configurable actions per item
- Configurable global limit announcements
- Built-in documentation examples
Hot Reload Support
You can reload the configuration and translation files without restarting the server.
/itemlimiter reload
If configuration files are missing, the plugin will automatically recreate them.
Commands
| Command | Description |
|---|---|
/itemlimiter help |
Displays all plugin commands |
/itemlimiter list [page] |
Lists configured item limits |
/itemlimiter info <material> |
Shows information about an item |
/itemlimiter check <material> |
Shows how many items you currently have |
/itemlimiter globalcheck <material> |
Shows your global crafted amount for an item |
/itemlimiter add <material> <limit> <actions> [seperate] |
Adds a new item limit |
/itemlimiter edit <material> <limit> <actions> |
Edits an existing item |
/itemlimiter remove <material> |
Removes an item limit |
/itemlimiter reload |
Reloads plugin configuration |
Permissions
| Permission | Description | Default |
|---|---|---|
itemlimiter.help |
Allows /itemlimiter help |
true |
itemlimiter.info |
Allows /itemlimiter info |
op |
itemlimiter.list |
Allows /itemlimiter list |
op |
itemlimiter.check |
Allows /itemlimiter check |
op |
itemlimiter.globalcheck |
Allows /itemlimiter globalcheck |
true |
itemlimiter.reload |
Allows /itemlimiter reload |
op |
itemlimiter.add |
Allows adding new item limits | op |
itemlimiter.edit |
Allows editing item limits | op |
itemlimiter.remove |
Allows removing item limits | op |
itemlimiter.bypass |
Bypasses all item limits | false |
itemlimiter.update.notify |
Allows receiving update notifications | op |
Why Use ItemLimiter?
Many servers suffer from item hoarding or stacking issues, such as:
- Carrying dozens of Totems
- Excessive Ender Pearl stacking
- Golden Apple hoarding
- Item imbalance in PvP or survival
- Storing restricted items inside containers
ItemLimiter provides a clean and configurable way to balance gameplay while still letting server owners decide exactly what should be restricted.
Compatibility
- Minecraft 1.20+
- Spigot / Paper
- Lightweight with minimal performance impact
Example Use Cases
Common items servers limit:
TOTEM_OF_UNDYING
ENDER_PEARL
ELYTRA
MACE
GOLDEN_APPLE
ENCHANTED_GOLDEN_APPLE
SHIELD
TRIDENT
Configuration Philosophy
ItemLimiter is designed to be:
- Simple
- Flexible
- Server-friendly
You decide which items, how many players can carry or store, and which interactions are restricted.
Support
If you encounter issues or have feature requests, feel free to open a ticket in the Discord server.
Enjoy a balanced and controlled inventory system for your server.
下载 ItemLimiter
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ItemLimiter
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ItemLimiter
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ItemLimiter
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ItemLimiter
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ItemLimiter
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ItemLimiter
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ItemLimiter
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
新增
- 对每个使用
MATERIAL#action的操作设置独立上限。 - 支持部分按住 Shift 点击合成,直至配置的上限。
- 允许从容器中部分取出物品。
- 将背包内容纳入容器上限检查。
更改
- 移除了
seperate命令标志。 - 每个操作现在都支持各自的上限。
- 容器上限不再影响玩家背包上限。
- 插件版本已更新为
2.5。
修复
- 修复了通过背包绕过容器上限的问题。
- 修复了错误的背包拒绝提示信息。
- 修复了容器上限导致玩家手持物品掉落的问题。
- 修复了重复的合成功能检查。
- 修复了按住 Shift 点击合成超出上限的问题。
- 修复了容器取物被完全阻止的问题。
- 修复了自动化容器传输绕过限制的问题。
说明
- 请使用
/itemlimiter add <material> <limit> <actions>。 - 重复使用
add仅会更新所选的操作。 - 规则保存时使用
MATERIAL#action格式。 - 现有的组合规则和旧版规则仍然受支持。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
插件
用于绘制游戏内地图或在浏览器中随探索实时进行地图绘制的实时地图。
评论 0
登录后参与评分
还没有评论,来抢沙发吧