Shopkeepers

Shopkeepers

2M Downloads

Keys for custom crates reset on each rastart/reload

mrawesome35700 opened this issue ยท 2 comments

commented

Preliminaries:

  • Shopkeepers version: 2.16.4
  • Spigot version: paper-409 (MC version 1.19.3)

  • I have checked that my issue/question does not get answered by:
  • I have checked all open and closed issues, but none seems to fit my issue/question.

The issue:

Im trying to have an npc trade a number of keys of one type for one of higher tier, but everytime I reload the plugin or restart the server, the keys revert their glow and no longer function in the npc's inventory when traded. I.E. they no longer work on crates.

commented

You need to check the internal NBT data of the affected items. These kinds of issues usually come up if:

  • The plugin creating those items embeds some unique data that changes over time. Items with different internal data are not considered equal.
  • The server itself may apply some transformations to the item data if it is in a format that is not supported by the plugin API. Typical example are values of unexpected type (e.g. enchantment levels of type integer instead of byte. The vanilla server is more lenient than the Spigot server in that aspect once plugins are handling the items (i.e. items that appear to work fine in vanilla cause issues once plugins interact with them).
  • Some plugins add a custom (non-vanilla) glow enchantment to items. The Spigot server does not support custom enchantments. One issue with those is for example that if an item with this enchantment is loaded by a plugin before the plugin that registers this custom enchantment is loaded (plugin load order is random by default), then the server will not recognize the custom enchantment and remove it from the item data.

So to investigate this issue you need to check the internal data and compare it across server restarts. You can for example use Minecraft's /data command to get the internal data of items in your inventory.
If you post the data of the mismatching items here, I can also take a look if I recognize any typical issue.

commented

Closing this as no further information was provided.