使用此插件,您可以通过 Bukkit API 在 Bukkit、Tekkit 和 FTB 服务器上禁止某些物品和方块。ItemRestrict 会从世界和玩家背包中移除被禁用的物品。它易于配置,支持回溯应用并自动移除相关物品。除非需要为特定玩家设置例外,否则无需安装权限插件。它与 1.2.5、1.3.2、1.4.7、1.5.2、1.6.4、1.7.10 兼容。
因为每一个以“我们决定做出改变……”开头的故事,都不应该以“……所以我们不得不重置世界。”作为结局。
安装
将 .jar 文件复制到您的 plugins 文件夹中以安装该插件。然后重启服务器或使用插件管理器加载该插件。
命令
使用命令 "/ires reload" 重新加载配置文件。
| 命令 | 权限节点 | 描述 |
| /ires reload | itemrestrict.reload | 重新加载配置 |
| /ires ban <banType> <id-datavalue> | itemrestrict.ban | 将物品添加到禁用列表 |
| /ires unban <banType> <id-datavalue> | itemrestrict.ban | 从禁用列表中移除物品 |
配置
config.yml 文件中包含 4 个主要部分:启用的世界列在 Worlds 下;世界扫描器设置位于 Scanner 下;禁用设置位于 Bans 下;发送给玩家的通知设置位于 Messages 下。BigScary 慷慨地为 Tekkit 创建了一个默认配置。
Worlds 部分列出的世界是将被插件检查的启用世界。您可以使用世界的文件夹名称来命名普通世界、维度以及 mystcraft 世界。添加一个名为 "All" 的世界(区分大小写)可以绕过世界检查。
Scanner 设置表示扫描已加载的玩家或已加载区块的概率百分比(范围从 0 到 1)。
您可以在 Bans 部分指定希望禁用的物品。请查看下面不同类型的禁用方式。仅包含物品 ID(如 32)的条目将指定所有羊毛(所有数据值)。包含用连字符分隔的物品 ID 和数据值的条目(如 32-2)则指定紫红色羊毛(数据值 2)。有些物品在背包中的值与在世界中放置后的值不同(例如背包中的门道具与世界中已放置的门)。一份完整的 方块 ID 列表 将有助于您添加被禁用的物品。
标签(label)会在通知玩家时赋予物品一个名称。原因(reason)说明了该物品为何被禁止。您可以同时使用颜色标记标签和原因,通过使用转义字符 "&" 以及对应于 Minecraft 颜色 的十六进制数来实现。
权限
创建禁用例外
您可以通过权限节点为个别玩家创建禁用例外,使他们能够使用通常被禁用的物品。拥有 /op 权限的玩家会自动忽略禁用规则。如果未指定数据值,则意味着所有数据值(-*)。以下是一些示例,希望能帮助您理解,无需进一步解释。
- ItemRestrict.bypass.usage.35
- ItemRestrict.bypass.ownership.35-6
您无法阻止特定玩家放置在世界中的方块被移除,因为该插件不追踪世界中已放置方块的归属权。
禁用类型
使用禁用 (Usage Bans)
此禁用类型防止玩家使用某物品,这意味着当物品在手握状态时,左键或右键点击均无效。此禁用还防止玩家右键点击由该禁用指定的方块。此禁用还防止玩家在世界中放置该方块。这对于像采矿激光器等物品非常有效,但无法阻止玩家使用那些受益于被动使用的物品(例如模组盔甲、修复护符等)。您需要所有权禁用来完全阻止玩家获得这些物品。如果玩家已经拥有后来被放置禁用的物品,他们仍然可以将其交易给其他玩家,或者将其分解为能量(EE 模组)以获取一定价值。
任何插件都无法阻止玩家在通过按键激活物品时使用它(例如 R、G、C 等),这种情况在等价交换(Equivalent Exchange)物品中尤为常见。这就是为什么许多 EE 物品被列入默认的所有权禁用列表,尽管它们的功能并不都值得被禁用。
建议将大部分或全部使用禁用物品添加到您的所有权禁用列表中。这将防止玩家无意中消耗资源去制作一个他们原本计划在世界中放置的方块,结果却无法放置,从而导致他们感到受骗并很可能投诉。唯一可能例外的情况是某个物品无法放置,但由于它是另一种未被禁用物品的配方原料,因此仍然有用。
所有权禁用 (Ownership Bans)
此禁用类型防止玩家从地面或容器(例如箱子)中拾取物品。如果玩家没有拥有某物品的权限,他们将无法制作该物品。违禁品扫描器会搜索每个玩家的背包,查找属于所有权禁用的物品,并在没有任何警告、通知或补偿的情况下实际移除它们。
此禁令还会阻止玩家合成物品。当玩家尝试合成该物品时,他们会收到无法合成的提示。这是防止玩家获得被禁物品的最友好方式。Forge 模组并不总是与 Bukkit 挂钩,这意味着玩家可能通过某些自动或非合成方式(例如炼金术)获得被禁物品。当你禁用某物品的合成功能时,请测试是否存在绕过方法,这可能会促使你进一步禁止其他相关物品以防止这些绕过手段。
世界范围禁令
此类禁令会通过异步世界扫描器(AWS)从世界中回溯移除已放置的方块。如果你需要禁止某个物品,并且知道它已经存在于世界中(例如能量收集器和世界锚点),这将非常有用。这有助于清理新被禁的物品,而无需在整个世界中搜索它们。不过存在例外情况,因为扫描器无法确定方块的归属者。
备注
本插件借鉴了 BigScary 的 TekkitCustomizer 中的理念。然而,其代码中的所有组件都已被高性能且简单的实现所替换。作为服务器管理员,我和你一样重视性能。因此,本插件实际上并未使用 TekkitCustomizer 插件的任何代码,源代码可在 此处 找到。
默认的禁令列表是基于 BigScary 进行实际操作测试后,为经典版 Tekkit 定制的。在决定从此列表中移除任何物品之前,请务必阅读 默认禁令的原因,以了解最初将其禁止的理由。如果你运行的是 FTB、Tekkit Lite 或其他整合包,请自行研究希望禁止的内容,并相应地修改配置文件。
节省你的时间!查看我们的常见问题解答页面,查找问题的答案。如果发现 bug,请提交工单并附上你的配置文件。
评论
西班牙语
支持者
感谢 piritacraft 测试了每个带票证的问题。
感谢 excavator5 测试了该插件。
感谢为本项目做出贡献的贡献者:
感谢慷慨捐赠给 ItemRestrict 的支持者:
捐赠
与其他可以选择是否游玩游戏的玩家不同,我对开发和管理的投入通常意味着我无法这样做,但我对此感到满意。我大量的空闲时间实际上都花在设计、开发、测试和修复像这样的插件上,以使 Minecraft 对所有玩家来说更加有趣。如果你喜欢这个插件,请考虑点击下方按钮给我发送一笔捐赠 :) 谢谢!
Use this plugin to ban items and blocks for Bukkit, Tekkit, and FTB servers using the Bukkit API. ItemRestrict removes banned items from the world and player inventories. It is easy to configure, can be applied retroactively, and automatically removes the items. It requires no permissions plugin unless exceptions are need for certain players. It is compatible with 1.2.5, 1.3.2, 1.4.7, 1.5.2, 1.6.4, 1.7.10.
Because every story that starts with "We decided to make a change..." shouldn't end with "...so we had to reset the world."
Installation
Copy the .jar file into your plugins folder to install the plugin. Then restart the server or use a plugin manager to load the plugin.
Commands
Use the command "/ires reload" to reload the config file.
| Command | Permission Node | Description |
| /ires reload | itemrestrict.reload | Reload the config |
| /ires ban <banType> <id-datavalue> | itemrestrict.ban | Add item to the ban list |
| /ires unban <banType> <id-datavalue> | itemrestrict.ban | Remove item from the ban list |
Configuration
There are 4 major sections in the cofig file (config.yml). Enabled worlds are listed under Worlds. World Ban scanner settings is under Scanner. Ban settings are under Bans. Notification settings to the player are under Messages. A default config for Tekkit was generously created by BigScary.
Worlds listed in the Worlds section are enabled worlds which will be checked by the plugin. You can name normal worlds, dimensions, and mystcraft worlds by using the world's folder name. Add the case sensitive world called "All" to bypass the world check.
The Scanner settings indicate the percentage chance (from 0 to 1) that it scans a loaded player or a loaded chunk.
You can specify the items you wish to ban under the Bans section. Take a look at the different types of bans below. An entry with only the item id (32) will specify ALL wool (all datavalues). An entry with the item id and datavalue separated by a dash (32-2) specifies MAGENTA wool (datavalue 2). Some items have a different values in your inventory as opposed to ones place in the world (eg. a door item in the inventory versus a placed door in the world). A full list of Block IDs will help you add banned items.
The label gives the item a name when notifying the player. The reason provides the reason of why the item was banned for them. You can use colour with both the label and the reason by using the escape character "&" and a hex number corresponding to the minecraft colour.
Permissions
Making Ban Exceptions
You can make individual ban exceptions to give some players to generally banned items through permission nodes. A player who has /op automatically ignores bans. Specifying the item ID without the datavalue means all data values (-*). Here are various examples, which should help you understand without further explanation.
- ItemRestrict.bypass.usage.35
- ItemRestrict.bypass.ownership.35-6
You can't prevent a specific player's placed block from being removed from the world as this plugin does not track who owns placed blocks in the world.
Types of Bans
Usage Bans
This ban prevents players from using an item, which means left-click or right-click while the item is in-hand. This ban also prevents players from right clicking a block specified by this ban. This ban also prevents a player from building a block in the world. This works well for items like the Mining Laser, but won't stop players from using items which benefit from passive use (eg. modded armors, Talisman of Repair, etc.). You will need an ownership ban to prevent players from getting those items at all. A player that already has an item which is later placement-banned can still trade it with another player or break it down into energy (EE mod) to get some value out of it.
It's not possible for any plugin to prevent a player from using an item when it is activated by a keystroke (eg. R, G, C, etc.), which are common especially for Equivalent Exchange items. This is why many EE items are on the default ownership bans list even though their functions are not all really ban-worthy.
It is recommend to place most or all usage ban items to your ownership ban list. This will prevent your players from unknowingly spending their resources to craft a block which they then can't place in the world like they planned leading to them feeling cheated and likely complaining. The only exception you might make to this rule is for an item which can't be placed, but is still useful because it's an ingredient in another recipe for an item you haven't banned.
Ownership Bans
This ban prevents player from picking up an item from the ground or from a container (eg. a chest). If a player doesn't have permission to own an item, they won't be able to craft it. The contraband scanner will search each player's inventory for ownership-banned items and actually remove them without warning, notification, or compensation.
This ban also prevents players from crafting an item. When the player tries to craft the item, they get a message that they can't. This is the most player-friendly approach to preventing players from getting banned items. Forge mods don't always hook into Bukkit, meaning its possible for players to get banned items through some automatic or non-crafting approach (eg. alchemy). When you crafting-ban an item, test for workarounds, which may lead you to ban additional items to prevent those workarounds.
World Bans
This ban will retroactively remove the placed block from the world through the Asynchronous World Scanner (AWS). This is great if you need to ban an item, but also know it's in the world (eg. energy collectors and world anchors). This will help clean up newly-banned items without having to search your entire world for them. There are exceptions to this removal as the scanner can't determine who owns the block.
Notes
This plugin uses the idea from BigScary's TekkitCustomizer. However all components in his code have been replaced with high performing and simple implementations. As a server administrator, I care about performance as much as you. Thus no code is actually used from the TekkitCustomizer plugin and the source code can be found here.
The default ban list is made for Classic Tekkit based on hands on testing done by BigScary. Before deciding to remove items from this list, be sure to read the reasons for default bans to understand why it was originally removed. If you are running FTB, Tekkit Lite, or other mod packs, do your own research for what you want banned and change the config file accordingly.
Save yourself some time! Check our Frequently Asked Questions page for the answer to your question. If you found a bug, make a ticket and include your config file.
Reviews
Spanish
Supporters
Thank you to piritacraft for testing each ticketed issue.
Thank you to excavator5 for testing the plugin.
Thank you to our contributers that have helped contribute to this project:
Thank you to our supporters that have generously donated to ItemRestrict:
Donations
Unlike other players who have a choice to play the game, my commitment to development and administration usually means I cannot and I'm fine with that choice. A lot of my free time is actually spent designing, developing, testing, and fixing plugins like this one to make Minecraft more enjoyful for all players. If you like this plugin, please consider sending me a donation by clicking the button below :) Thanks!
评论 0
登录后参与评分
还没有评论,来抢沙发吧