一个 MMOItems 扩展,添加了两个新属性用于创建有时效性的物品。
注意:
- MMOItems 是一个需要购买的付费插件
- 关于此扩展的任何问题/错误,请勿向 MMOItems 寻求支持。如有此类情况,请联系我!
新增属性
过期时长 (Expiry Period)
表示物品持续时间的数值(以秒为单位)。该时长是相对于玩家首次获得物品的时间计算的。 例如:设置为 30 天:30 * 24 * 60 * 60 = 2592000 秒
过期日期 (Expiry Date)
自 Unix 纪元以来的绝对过期日期(以毫秒为单位)
你只需关注第一个属性,即“过期时长”。 所有物品都会自动进行检查,第二个属性会在必要时自动添加。
过期物品处理
- 默认:移除该物品
- 将该物品替换为一个或多个其他物品(可以针对特定物品或特定物品类别)
- 禁用物品移除。但此类物品将变为不可用状态
设置
要在物品描述中显示这些属性,请在语言文件 lore-format.yml(位于 MMOItems 配置文件夹内)中添加以下内容:
- '#expiry-period#'
- '#expiry-date#'
阅读更多:
命令
/ti (别名: /tmi, /timeditems, /timedmmoitems)
/ti reload: 重载配置
常见问题
1. 物品没有变成过期状态
- 你可能拥有绕过权限 timeditems.bypass,除非在配置中禁用了该绕过权限
- 重新检查物品,因为它可能尚未包含相关属性
2. 如何观察插件的运行活动?
- 在配置中将调试级别从 0 提高到 3(0 = 禁用)
3. 扩展的工作原理是什么?
- 如果存在“过期日期”,插件将检查物品是否已过期并在必要时将其移除。如果有物品替换设置,物品可能会被替换。即使物品保留下来,它也将不再可用。
- 如果存在“过期时长”,插件会根据当前时间将其转换为“过期日期”。换句话说,过期日期 = 当前时间 + 过期时长。因此,插件能够知道用于检查和移除的绝对过期日期。
4. 为什么描述中没有过期信息?
- 你尚未修改描述模板(见上文)
5. 我可以更改描述和日期格式吗?
- 你可以在配置中更改每个属性的描述以及日期格式
- 验证或预览日期格式:
6. 插件对性能有何影响?
- 检查任务按照配置选项定义的固定间隔运行 item-check-interval(以秒为单位)
- 插件会尝试跳过非 MMOItems 物品
- 仅在发生至少一项物品变更时才会执行库存更新
- 建议增加 item-check-interval 以避免性能影响。作为权衡,短暂的过期延迟是完全可接受的。
7. 如何在某些世界中禁用检查?
- LuckPerms 支持上下文权限。你可以为特定世界授予绕过权限。记得也在配置中启用绕过权限。
支持
加入我的 Discord 服务器获取插件支持
如果这个插件对你有帮助,请给我五星好评。谢谢!
想要监控你的服务器吗?免费试用 Crystade ✨
A MMOItems extension that adds 2 new stats for creating expirable items.
Note:
- MMOItems is a premium plugin that requires purchase
- Don't ask for support from MMOItems for any questions/bugs relating to this extension. In that case, please contact me!
New Stats
Expiry Period
A duration representing how long the item will last (in seconds). This duration is relative to the first time the player obtains the item. For example: to set 30 days: 30 * 24 * 60 * 60 = 2592000 seconds
Expiry Date
The absolute expiry date since the Unix epoch (in milliseconds)
You should only care about the first stat which is Expiry Period. All items will be automatically checked and the second stat will be added when necessary.
Expired items handle
- Default: Remove the item
- Replace the item with one or multiple other items (could be specific to a certain item, or a certain item category)
- Disable item removal. However, such items remain unusable
Setup
To display the stat in item lore, add the following to language/lore-format.yml (in MMOItems config folder)
- '#expiry-period#'
- '#expiry-date#'
Read more:
Command
/ti (alias: /tmi, /timeditems, /timedmmoitems)
/ti reload: reload the config
FAQ
1. The item does not become expired
- You might have bypass permission timeditems.bypass unless the bypass permission is disabled from the config
- Re-check the item, since it might not have the stat yet
2. How do I observe the plugin activity?
- Raise the debug level in the config, from 0 to 3 (0 = disabled)
3. How does the extension work exactly?
- If Expiry Date exists, the plugin will check if the item is out of date and remove if necessary. The item could be replaced if there is item replacement settings. Even if the item remains, it is no longer usable.
- If Expiry Period exists, the plugin will convert it to Expiry Date based on the current time. In other words, expiry date = current time + expiry period. Thus, the plugin knows the absolute expiry date for checking and removal.
4. Why there is no expiry information in the lore?
- You have not changed the lore template yet (see above)
5. Can I change the lore and the date format?
- You can change the lore of each stat along with the date format from the config
- To validate or preview the date format:
6. How does the plugin affect the performance?
- The check task runs in a fixed interval defined by the config option item-check-interval (in seconds)
- The plugin would try to skip non-MMOItems
- Inventory update is performed only if there is at least an item change
- Raise item-check-interval is recommended to avoid performance impact. As a trade-off, a short delay in expiry time is totally acceptable.
7. How to disable the check in certain worlds?
- LuckPerms support contextual permission. It is possible to grant the bypass permission to a certain world. Remember to enable bypass permission in the config as well.
Support
Join my Discord server for plugin support
Give me a five-star review if this plugin is helpful. Thanks!
Wanna monitor your server? Try Crystade for free ✨
下载 TimedMMOItems
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TimedMMOItems
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TimedMMOItems
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TimedMMOItems
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TimedMMOItems
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
添加更多版本并将依赖项更新到最新版本
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
插件
用于绘制游戏内地图或在浏览器中随探索实时进行地图绘制的实时地图。

评论 0
登录后参与评分
还没有评论,来抢沙发吧