ItemRules 是一款简单易用但高度可配置的插件,用于根据世界、玩家的经验等级、玩家所属的阵营、其 mcMMO 技能等级、权限组/排名、权限等条件,控制物品和方块在何时、何地以及如何被使用、拾取、合成、放置或破坏。它是我之前发布的插件 LevelRestrictions 的全面重写/修订版。
最新版本构建

ItemRules 允许你根据经验等级限制物品和方块,并且可以与 Factions(例如:仅允许特定阵营使用某些物品)、McMMO(例如:除非采矿技能达到最低等级,否则禁止开采矿石)以及 Vault(例如:基于权限组限制武器)进行集成。
ItemRules 还允许你配置规则,当玩家进入定义的区域时应用这些规则(例如:一个只允许使用胡萝卜作为武器的 PvP 区域)。
配置示例
以下是一个直到玩家达到 2 级才允许使用铁制工具和装备的限制示例:
ironEquipment:
description: 'Use of iron stuff until level 2'
messages:
restricted: 'You cant %s %s until level 2'
actions: [USE, BREAK, PICKUP]
xp:
min: 2
items:
restrict: [256, 257, 258, 267, 292]
以下是 McMMO 集成的示例,该示例阻止玩家在伐木技能达到 2 级之前砍伐白桦树:
Woodcutting-Brichwood:
messages:
restricted: 'You cant cut birch until woodcutting 2'
actions: [BREAK]
mcmmo:
skills:
woodcutting: 2
items:
restrict: ['17.2']
你还可以通过向规则中添加以下内容来指定应用于特定组的规则(注意这需要安装 Vault):
groups:
applyto: ['newbs', 'badpeeps']
你可以使用相同的格式通过 Vault 排除对特定组的规则,例如:
groups:
exclude: ['vips']
权限
请注意,默认情况下所有 OP(管理员)都将绕过规则。
| 权限 | 备注 |
| itemRules.bypass.* | 不对玩家处理任何规则 |
| itemRules.bypass.RULENAME | 不对玩家处理特定规则 |
命令
| 命令 | 参数 | 示例 | 说明 |
| /rules | [玩家名称] | | 列出当前应用于玩家的所有规则。若针对自身则无需参数 |
更新日志
- v1.0.9 - 2013年6月21日
- 修复了当实体使用无效物品攻击玩家时出现的静默异常处理问题。
- v1.0.8 - 2013年2月18日
- v1.0.6 - 2013年2月17日
- 修复了某些手动规则未正确应用的错误。
- 更改了物品文本以在安装 Vault 时使用 Vault。
- v1.0.5 - 2013年2月9日
- 更改了权限检查逻辑,优先使用 Vault(如果已安装)而非 Bukkit。
- 修复了多项错误
- v1.0.3 - 2013年2月9日
- 更改了 mcMMO 技能类型检查,以利用其新的 API,该 API 接受字符串而非数据类型。
- v1.0.2 - 2013年1月30日
- 增加了对构建版本晚于 #1282(2013年1月22日)的 mcMMO 版本的支持。否则为完全相同的构建。
ItemRules is a simple to use, but highly configurable plugin for controlling how, when and even where items and blocks can be used, picked up, crafted, placed or broken based on the world, a players xp level, the faction they are in, their mcMMO skill level, their rank/group, their permissions, and more. It is a complete rewrite/revisioning of my previous plugin LevelRestrictions
Latest Builds

ItemRules can allow you to restrict items and blocks based on XP level and/or will integrate with Factions (e.g. allow only certain factions to use certain items), McMMO (e.g. restrict ores from being mined unless mining skill is a minimum level), Vault (e.g. restrict weapons based on permission group).
ItemRules will also allow you to configure certain rules that will be applied when players walk into defined regions (e.g. a PvP zone that only allows you to use carrots as weapons)
Configuration Examples
Here is an example of restricting iron tools and equipment until player is level 2:
ironEquipment:
description: 'Use of iron stuff until level 2'
messages:
restricted: 'You cant %s %s until level 2'
actions: [USE, BREAK, PICKUP]
xp:
min: 2
items:
restrict: [256, 257, 258, 267, 292]
Here is an example of McMMO integration that prevents cutting down Birch trees until woodcutting skill is level 2:
Woodcutting-Brichwood:
messages:
restricted: 'You cant cut birch until woodcutting 2'
actions: [BREAK]
mcmmo:
skills:
woodcutting: 2
items:
restrict: ['17.2']
You can also specify rules to apply to groups (note this requires Vault) by adding this to your rule:
groups:
applyto: ['newbs', 'badpeeps']
You can use the same format to exclude rules from groups (using Vault) like:
groups:
exclude: ['vips']
Permissions
Note that by default all OP's will bypass rules.
| permission | notes |
| itemRules.bypass.* | Do not process ANY rules for player |
| itemRules.bypass.RULENAME | Do not process specific rule for player |
Commands
| command | arguments | example | explanation |
| /rules | [playername] | | list all rules currently applied to player. No arguments for self |
Change log
- v1.0.9 - Jun 21st, 2013
- Silent exception handling when Entity attacks player with an invalid item.
- v1.0.8 - Feb 18th, 2013
- Fixed potential issue with groups and perms not applying correctly.
- v1.0.6 - Feb 17th, 2013
- Fixed bug with certain manual rules not properly applying.
- Changed Item text to use Vault if installed.
- v1.0.5 - Feb 9th, 2013
- Changed permission check to prefer Vault (if installed) over Bukkit.
- Bugs zapped
- v1.0.3 - Feb 9th, 2013
- Changes mcMMO skill type checks to take advantage of their new api accepting strings instead of data types.
- v1.0.2 - Jan 30th 2013
- Added support for mcMMO versions with build newer than #1282 ( Jan 22nd 2013). Otherwise, same exact build.
评论 0
登录后参与评分
还没有评论,来抢沙发吧