you just posted how todo it
Expiry Time
All items can have an expiry time set to them. This is a
real time value that once expires will delete the item. If an expiry time is set on a consumable type the item will still be disappear as normal if used prior to the expiry time.
To give an item an expiry time it should be added as a short time format in square brackets on the end of the items name. The square brackets and everything inside it is not displayed to the user in game, as will appear as a countdown on the items hover label.
Annotation | Meaning | Example |
---|
m | Minute | WoodenSword[5m] would give 5 minutes until it expires |
h | Hour | |