90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!

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!

This plugin adds two 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.

Bypass permission: timeditems.bypass

To display in lore, add the following to lore-format.yml

- '#expiry-period#'
- '#expiry-date#'

How does the extension work exactly?

  • If Expiry Date exists, the plugin will check if the item used is out of date and then remove it if necessary. If removal is disabled from the config, the item remains non-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.

Useful links:


Project members

anhcraft

Owner

Details

Licensed GPL-3.0-only
Published 2 years ago
Updated a year ago