RestockIt
关于权限的说明
如果你在使用 1.9.1 版本时 RestockIt 突然失效,请查看下方的权限和发行说明——旧的已弃用权限(已有 1.5 年未被使用)已被移除!
restockit.chest.* 权限现已弃用——详见下文! 它仍然可以工作,但未来可能会引发问题(正如我刚才提到的那样)。
简介
RestockIt 允许你向箱子、陷阱箱、漏斗、发射器和投掷器(以及你想要添加的其他任何容器)中填充无限数量的物品,或者逐渐补充的物品。
它支持 PermissionsEX 和 SuperPerms,分别为创建 RestockIt 箱子和 RestockIt 发射器提供独立的权限。
如果你不使用 PEX 或 SuperPerms,RestockIt 会自动检测到此情况,并仅允许管理员(ops)创建 RestockIt 箱子或发射器。
RestockIt 还包含一个黑名单功能,你可以防止使用危险或昂贵的物品。
目前有一个重大更新正在开发中,这将是一次几乎完全的重写;其中包括附魔、单个箱子内不同物品等功能。由于没有具体的预计发布时间(ETA),我能给出的最好答复是“最终”——为了避免让人失望,我不想给出具体日期。
使用方法
要创建一个 RestockIt 容器,请在箱子/发射器/其他容器的上方或下方放置一个告示牌,并使用以下语法:
第 1 行:任意内容
第 2 行:RestockIt
第 3 行:物品编号或名称
第 4 行:延迟补货信息 或 任意内容
每个容器需要一个告示牌,双格箱子只需一个告示牌即可。但是,如果你在双格箱子的两半上方各放置一个告示牌,且每个告示牌上的物品不同,那么双格箱子将按每种物品一半的比例进行填充。
附加功能
- 除了物品 ID 编号外,还可以使用 Minecraft 内部名称,例如:stone 或 trapped_chest
- 完全支持带有耐久度值的物品,例如,浅绿色羊毛应写为 WOOL:5 或 35:5
- 你还可以将 RestockIt 用作焚化炉——只需在第 3 行输入 Incinerator 即可。
- 发射器在被触发时会自动补充自身——你无需打开它们。
- RestockIt 支持 Full Chest 语法以及其自身的语法,因此如果你之前使用的是 Full Chest,则无需重新为所有箱子设置告示牌。
- 若要使用延迟补货,请将第 4 行设置为:
- x Items, ys - 这将在每 y 秒后补充一个物品,直到箱子里有 x 个物品为止。(备选格式:xi,ys)
- x Stacks, ys - 这将在每 y 秒后补充一组物品,直到箱子里有 x 组物品为止。(备选格式:xs,ys)
- 除了以秒为单位指定时间外,如果不输入时间后的 s,还可以以刻(tick,即 1/20 秒)为单位指定时间。
- 请记住在物品数量和延迟之间加上逗号,否则将无法工作。
- 如果你不想使用延迟补货,可以将第 4 行留空,或者在其中输入任意内容。
- 要使用黑名单,只需在 RestockIt 文件夹中的 config.yml 文件中添加物品(编号或首字母大写的名称,就像在告示牌上一样)。
- 默认情况下,基岩和 TNT 被列入黑名单——如果需要,你可以移除这些条目。
- 要向填充列表中添加其他容器,请在 config.yml 中的 "singleContainers"、"doubleContainers" 或 "dispensers" 列表中添加入项——这些应该一目了然。
- 除非你有特定想要使用的容器,否则建议保持这些设置不变。
权限
PEX 和 SuperPerms 的权限如下:
- restockit.container.create
- restockit.container.open
- restockit.container.destroy
- restockit.dispenser.create
- restockit.dispenser.open
- restockit.dispenser.destroy
- restockit.incinerator.create
- restockit.incinerator.open
- restockit.incinerator.destroy
- restockit.blacklist.bypass
请记住,你不需要 PEX 或 SuperPerms 来使用 RestockIt——如果没有 PEX,它将自动使用管理员(op)状态。
在没有权限插件的情况下,*.open 默认为所有人可用,*.create 和 *.destroy 默认为管理员可用,而 restockit.blacklist.bypass 默认为无人可用。
此外,你可以在 config.yml 中使用 opsOverrideBlacklist 设置(将其设为 true)来允许管理员绕过黑名单。(这仅在未使用权限系统时非常有用)
计划中的功能
- 一种控制箱子能接受放入多少物品的机制
- 能够保存当前箱子库存并进行补充的功能
- 一种从多个“从属”箱子访问主箱子的系统
1.9.2/3 新增功能
- 修复了与黑名单相关的旧版权限检测问题
- RestockIt(希望如此)现在兼容 Java 1.6
- 修复了在特定情况下检查权限时的异常错误
抱歉频繁更新!
1.9.1 新增功能:
- [Bugfix] 权限现在与新容器配合正常工作
- 已移除旧的弃用权限
- 新权限 restockit.container.(create|destroy|open)
- 权限 restockit.chest.* 已被弃用(仍可工作,但请尽快更改...)
1.9 新增功能:
- 现在可以使用任何容器(在 config.yml 中设置)
- 陷阱箱、发射器和漏斗现已开箱即用
- 告示牌上的物品名称不再必须全大写
- 通用代码清理(如有兴趣请参阅 GitHub)
您可以通过本页右上角的按钮下载 Restockit。
最新版本可通过 wget 友好的链接获取:
源代码可在 获取
RestockIt 是开源软件,采用 GNU GPL v2 许可证。
特别感谢 Scott Marshall 对代码贡献和调试提供的帮助。
RestockIt
Note about Permissions
If Restockit has suddenly broken for you with 1.9.1, check the permissions and release notes below - OLD deprecated permissions (not used for 1.5 years) have been removed!
The restockit.chest.* permission has now been deprecated - see below! It still works, but will likely eventually cause issues (such as what I just mentioned)
About
RestockIt allows you to fill chests, trapped chests, hoppers, droppers and dispensers (plus whatever other containers you want to add) with infinite items, or with gradually refilling items.
It supports PermissionsEX and SuperPerms, with separate permissions for creating RestockIt chests and RestockIt dispensers.
If you don't use PEX or SuperPerms, RestockIt will automatically detect this and only allow ops to create RestockIt chests or dispensers.
RestockIt also has a blacklist, so you can prevent the use of dangerous or expensive items.
There is a major update in the works, which is an almost full rewrite; this will include things like enchantments, different items in one chest and more. I don't have an ETA for it, so the best I can give is "eventually" - I don't want to give a date to avoid disappointment.
How to use
To create a RestockIt container, create a sign above or below the chest/dispenser/whatever with the following syntax:
line 1: Anything
line 2: RestockIt
line 3: Item number or name
line 4: Delayed Restocking Information OR Anything
One sign is required per ccontainer, double chests only require one sign. However, if you place a sign above each half of the double chest, with different items on each, the double chest will be filled half-and-half with each item.
Additional Features
- As well as item ID numbers, internal Minecraft names can also be used, for example: stone or trapped_chest
- Items with damage values are fully supported, for example Lime Green Wool would be written as WOOL:5 or 35:5
- You can also use RestockIt as an Incinerator - just put Incinerator on line 3.
- Dispensers will automatically re-stock themselves whenever they are triggered - you don't need to open them.
- RestockIt supports Full Chest syntax as well as its own, so you don't have to re-sign all of your chests if you used to use Full Chest.
- To use delayed restocking, set the 4th line to:
- x Items, ys - this will restock one item every y seconds, until there are x items in the chest. (Alternate: xi,ys)
- x Stacks, ys - this will restock one item every y seconds, until there are x stacks in the chest. (Alternate: xs,ys)
- Rather than specifying time in seconds, you can specify it in ticks (20ths of a second), by not typing an s after the time.
- Remember to put a comma between the number of items and the delay, or it won't work.
- If you don't want to use delayed restocking, leave line 4 blank, or put anything you want in it.
- To use the blacklist, simply add items (number or capitalised name, just like on a sign) to the config.yml file in the RestockIt folder.
- Bedrock and TNT are blacklisted by default - you can remove these if you want.
- To add additional containers to fill, add items to the "singleContainers", "doubleContainers" or "dispensers" list in config.yml - they should be fairly self-explanatory.
- Unless there's a container you specifically want to use, I'd recommend leaving these alone.
Permissions
Permissions for PEX and SuperPerms are:
- restockit.container.create
- restockit.container.open
- restockit.container.destroy
- restockit.dispenser.create
- restockit.dispenser.open
- restockit.dispenser.destroy
- restockit.incinerator.create
- restockit.incinerator.open
- restockit.incinerator.destroy
- restockit.blacklist.bypass
Remember, you don't need PEX or SuperPerms to use RestockIt - It will automatically use op status if you don't have PEX.
Without a permissions plugin, *.open defaults to everyone, *.create and *.destroy default to ops, and restockit.blacklist.bypass defaults to nobody.
Also, you can use the opsOverrideBlacklist setting (set it to true) in the config.yml to allow ops to bypass the blacklist. (This is only really useful if you're not using a permissions system)
Planned Features
- A way to control how many items a chest can accept being put into it
- Ability to save current chest inventory, and restock that
- A system of accessing a main chest from multiple other "slave" chests
New to 1.9.2/3
- Fixed issue with deprecated permission detection for the blacklist
- RestockIt (hopefully) now works with Java 1.6
- Fixed exception when checking permissions under certain circumstances
Sorry for the rapid updates!
New to 1.9.1:
- [Bugfix] Permissions now work properly with new containers
- OLD deprecated permissions have been REMOVED
- New permission restockit.container.(create|destroy|open)
- Permission restockit.chest.* has been DEPRECATED (still works, but please change it...)
New to 1.9:
- Any container can now be used (set in config.yml)
- Trapped chests, droppers and hoppers now supported out of the box
- Items on signs no longer have to be all upper case
- General code cleanup (see GitHub if interested)
You can download Restockit from the button at the top right of this page.
The latest build is available at a wget-friendly link:
Source is available at
RestockIt is open source, and uses the GNU GPL v2 license.
Special thanks go to Scott Marshall for code contributions and debug help.
评论 0
登录后参与评分
还没有评论,来抢沙发吧