Archived: This plugin is maintained here: https://github.com/PlayZenka/Shopkeepers-MMOItems
This plugin is designed for stable integration of Shopkeepers with items from MMOItems.
Its purpose is to eliminate the incompatibility between Shopkeepers and MMOItems, which can cause trades involving MMOItems to fail or be blocked.
The plugin does not add new mechanics but ensures correct functionality of existing trades.
Shopkeepers strictly compares items during trades. Over time, the same MMOItem can differ from the saved trade, causing Shopkeepers to block the transaction.
The plugin intercepts the UpdateItemEvent from Shopkeepers and:
- Determines if the item is an MMOItem
- Retrieves the canonical ItemStack from MMOItems using TYPE + ID
- Normalizes the trade item to the canonical version
- Replaces the item before Shopkeepers performs its check
This ensures:
- all trades use the same ItemStack
- Shopkeepers considers the items identical
- trades proceed reliably
An item is considered an MMOItem if:
- it has a type (
NBTItem.hasType()) - it contains the tag
MMOITEMS_ITEM_ID
If either condition is not met, the item is ignored and not modified.
Vanilla items and items from other plugins are not affected.
During the UpdateItemEvent:
- The trade ItemStack is retrieved
- MMOItems TYPE and ID are extracted
- The canonical ItemStack is retrieved from MMOItems
- A comparison is performed
- If they do not match, the item is updated
- Dynamic MMOItems data (e.g., damage variance) does not work
enable-item-updater: true
debug: falsefalse— logging is disabledtrue— each MMOItem update in trades is logged
- Shopkeepers (API is used directly)
- MMOItems
- MythicLib (dependency of MMOItems)
- None
The plugin was tested on:
- Paper 1.21.4
- Shopkeepers-2.25.0
- MMOItems-6.10.1-32
- MythicLib-dist-1.7.1-33
- Discord - @PlayZenka