Item Limiter - 插件说明
概述
Item Limiter 是一款功能强大且灵活的 Minecraft Paper 插件,赋予服务器管理员完全控制玩家物品栏中每种物品数量的能力。非常适合平衡游戏性、经济系统控制以及防止物品囤积。
主要特性
全面的物品限制
- 使用简单的配置为任何 Minecraft 物品设置单独的限制
- 限制适用于所有槽位中的物品总数
- 支持所有 Minecraft 材质和物品
- 易于编辑的 YAML 配置文件,包含清晰的示例
多层保护
该插件通过多种方法防止玩家超出限制:
- 拾取地面物品防护:达到限制时阻止拾取物品,接近限制时允许部分拾取
- 容器交互阻止:防止从箱子、 barrels(木桶)、潜影盒和其他容器中取出物品
- Shift 点击防护:阻止通过 Shift 点击将物品从容器移动到物品栏
- 拖放防护:阻止将受限物品拖入物品栏
- 光标移动阻止:防止通过鼠标光标手动移动受限物品
自动执行
- 定期物品栏扫描:可配置的计时器检查所有在线玩家的物品栏
- 自动移除超额物品:在扫描期间移除超出限制的物品
- 玩家通知:清晰的颜色编码消息告知玩家已达到限制
- 智能部分拾取:当拾取会导致超出限制时,仅收集允许的数量
管理功能
- 绕过权限:操作员(Ops)和受信任的玩家可以绕过所有限制
- 重载命令:无需重启服务器即可更新配置
- Tab 补全:用户友好的命令界面
- 详细日志:查看启动时加载了哪些限制
性能与兼容性
- 优化检查:高效的事件处理最小化对服务器的影响
- 可配置间隔:设置扫描频率以平衡执行效果和性能
- Paper API:专为 Paper 1.21.8 及其兼容分支构建
- Java 21:使用最新 Java 特性的现代代码库
应用场景
经济类服务器
- 限制货币物品(如绿宝石或钻石)以维持平衡的经济系统
- 通过控制贵重物品的积累来防止通货膨胀
- 为稀有物品创造稀缺性以推动玩家交易
生存类服务器
- 限制 TNT 或其他爆炸物以确保安全并防止破坏行为
- 控制附魔金苹果以保持挑战性
- 限制下界合金锭以保留终局进度
小游戏类服务器
- 在竞技游戏模式中平衡玩家物品栏
- 通过限制强力物品确保公平游戏
- 通过物品限制创建自定义挑战
角色扮演类服务器
- 强制执行现实主义的物品栏限制
- 控制特殊的角色扮演物品并防止囤积
- 通过物品容量限制保持沉浸感
配置示例
check-interval: 60 # 每 60 秒扫描一次物品栏
item-limits:
DIAMOND: 64 # 限制为一组
EMERALD: 32 # 限制为半组
GOLDEN_APPLE: 16 # 限制金苹果
ENCHANTED_GOLDEN_APPLE: 4 # 严格限制不死图腾
NETHERITE_INGOT: 32 # 控制终局材料
TNT: 64 # 防止 TNT 囤积
ENDER_PEARL: 16 # 限制机动性物品
TOTEM_OF_UNDYING: 2 # 稀有生存物品
命令与权限
命令:
/itemlimiter reload - 重载配置(权限:itemlimiter.reload)
- 别名:
/ilimit, /il
权限:
itemlimiter.reload - 允许重载插件(默认:op)
itemlimiter.bypass - 绕过所有限制(默认:op)
玩家体验
当玩家遇到限制时,他们会收到清晰的反馈:
- 达到限制:"§c[Item Limiter] 您无法再拾取更多 DIAMOND(限制:64)"
- 部分拾取:"§e[Item Limiter] 拾取了 10 个 EMERALD(已达限制:32)"
- 移除超额:"§c[Item Limiter] 移除了 15 个 TNT(限制:64)"
消息使用 Minecraft 颜色代码以实现视觉清晰度,设计为提供信息且不具侵入性。
技术细节
- 版本:1.0.0
- Minecraft 版本:1.21.8
- 服务器软件:Paper(或兼容分支如 Purpur、Pufferfish)
- Java 版本:21+
- 主类:
com.Orange.itemLimiter.ItemLimiter
- 依赖项:无(由服务器提供 Paper API)
安装
- 下载
ItemLimiter-1.0.0.jar
- 放入服务器的
plugins/ 文件夹
- 重启服务器或使用插件管理器加载
- 编辑
plugins/ItemLimiter/config.yml 以配置限制
- 使用
/itemlimiter reload 应用更改
从源代码构建
需要 Maven 和 JDK 21:
mvn clean package
输出:target/ItemLimiter-1.0.0.jar
支持
由 Electric Orange 开发
网站:electric-orange.co.uk
如有问题、功能请求或疑问,请通过网站联系。
为什么选择 Item Limiter?
✓ 简单而强大 - 易于配置,全面保护
✓ 注重性能 - 优化的代码将对服务器的影响降至最低
✓ 积极维护 - 针对最新的 Minecraft 版本构建
✓ 完全可定制 - 精确控制哪些物品及其数量
✓ 玩家友好 - 清晰的提示和智能的部分拾取
✓ 管理员友好 - 支持绕过权限和热重载
Item Limiter 在服务器控制和玩家体验之间提供了完美的平衡,使其成为任何希望有效管理物品数量的服务器管理员不可或缺的工具。
Item Limiter - Plugin Description
Overview
Item Limiter is a powerful and flexible Minecraft Paper plugin that gives server administrators complete control over how many of each item type players can possess in their inventory. Perfect for balanced gameplay, economy control, and preventing item hoarding.
Key Features
Comprehensive Item Limiting
- Set individual limits for any Minecraft item using simple configuration
- Limits apply to total inventory count across all slots
- Supports all Minecraft materials and items
- Easy-to-edit YAML configuration with clear examples
Multi-Layer Protection
The plugin prevents players from exceeding limits through multiple methods:
- Ground Pickup Prevention: Blocks picking up items when at limit, allows partial pickup when close to limit
- Container Interaction Blocking: Prevents taking items from chests, barrels, shulkers, and other containers
- Shift-Click Protection: Stops shift-clicking items from containers to inventory
- Drag & Drop Prevention: Blocks dragging limited items into inventory
- Cursor Movement Blocking: Prevents manually moving limited items with mouse cursor
Automatic Enforcement
- Periodic Inventory Scans: Configurable timer checks all online players' inventories
- Automatic Excess Removal: Removes items that exceed limits during scans
- Player Notifications: Clear, color-coded messages inform players when limits are reached
- Smart Partial Pickup: When picking up would exceed limit, only the allowed amount is collected
Administrative Features
- Bypass Permission: Ops and trusted players can bypass all limits
- Reload Command: Update configuration without restarting the server
- Tab Completion: User-friendly command interface
- Detailed Logging: See which limits are loaded on startup
Performance & Compatibility
- Optimized Checks: Efficient event handling minimizes server impact
- Configurable Intervals: Set scan frequency to balance enforcement and performance
- Paper API: Built specifically for Paper 1.21.8 and compatible forks
- Java 21: Modern codebase using latest Java features
Use Cases
Economy Servers
- Limit currency items like emeralds or diamonds to maintain balanced economy
- Prevent inflation by controlling valuable item accumulation
- Create scarcity for rare items to drive player trading
Survival Servers
- Limit TNT or explosive items for safety and grief prevention
- Control enchanted golden apples to maintain challenge
- Restrict netherite ingots to preserve endgame progression
Mini-Game Servers
- Balance player inventories in competitive game modes
- Ensure fair gameplay by limiting powerful items
- Create custom challenges with item restrictions
Roleplay Servers
- Enforce realistic inventory limitations
- Control special roleplay items and prevent hoarding
- Maintain immersion with inventory capacity restrictions
Configuration Example
check-interval: 60 # Scan inventories every 60 seconds
item-limits:
DIAMOND: 64 # Limit to one stack
EMERALD: 32 # Limit to half stack
GOLDEN_APPLE: 16 # Limit golden apples
ENCHANTED_GOLDEN_APPLE: 4 # Heavily limit god apples
NETHERITE_INGOT: 32 # Control endgame materials
TNT: 64 # Prevent TNT hoarding
ENDER_PEARL: 16 # Limit mobility items
TOTEM_OF_UNDYING: 2 # Rare survival items
Commands & Permissions
Commands:
/itemlimiter reload - Reload configuration (Permission: itemlimiter.reload)
- Aliases:
/ilimit, /il
Permissions:
itemlimiter.reload - Allows reloading the plugin (Default: op)
itemlimiter.bypass - Bypass all item limits (Default: op)
Player Experience
When a player encounters a limit, they receive clear feedback:
- At Limit: "§c[Item Limiter] You cannot pick up more DIAMOND (limit: 64)"
- Partial Pickup: "§e[Item Limiter] Picked up 10 EMERALD (limit reached: 32)"
- Excess Removed: "§c[Item Limiter] Removed 15 TNT (limit: 64)"
Messages use Minecraft color codes for visual clarity and are designed to be informative without being intrusive.
Technical Details
- Version: 1.0.0
- Minecraft Version: 1.21.8
- Server Software: Paper (or compatible forks like Purpur, Pufferfish)
- Java Version: 21+
- Main Class:
com.Orange.itemLimiter.ItemLimiter
- Dependencies: None (Paper API provided by server)
Installation
- Download
ItemLimiter-1.0.0.jar
- Place in server's
plugins/ folder
- Restart server or load with plugin manager
- Edit
plugins/ItemLimiter/config.yml to configure limits
- Use
/itemlimiter reload to apply changes
Building from Source
Requires Maven and JDK 21:
mvn clean package
Output: target/ItemLimiter-1.0.0.jar
Support
Developed by Electric Orange
Website: electric-orange.co.uk
For issues, feature requests, or questions, please contact through the website.
Why Choose Item Limiter?
✓ Simple Yet Powerful - Easy configuration, comprehensive protection
✓ Performance Focused - Minimal server impact with optimized code
✓ Actively Maintained - Built for latest Minecraft versions
✓ Fully Customizable - Control exactly which items and quantities
✓ Player Friendly - Clear messages and smart partial pickup
✓ Admin Friendly - Bypass permissions and hot-reload support
Item Limiter provides the perfect balance between server control and player experience, making it an essential tool for any server administrator looking to manage item quantities effectively.
评论 0
登录后参与评分
还没有评论,来抢沙发吧