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: https://gitlab.com/phoenix-dvpmt/mmoitems/-/wikis/Lore-Formats/
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: http://www.sdfonlinetester.info/
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!
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+