Shopkeepers

Shopkeepers

2M Downloads

Error while Updating from 1.21.4 to 1.21.5

Closed this issue · 7 comments

commented

Hi, I'm currently in the process of updating my server from 1.21.4 to 1.21.5.
I've updated from Shopkeeper from 2.23.3 to 2.23.5 but there is a startup error causing the plugin to disable.
I'm using PaperMC-1.21.5-56 and I did not edit anything in the plugin folder.

I've attached the logs. It seems to be having trouble reading shopkeeper data from the previous version. Thank you for looking into it.

[21:38:50] [Server thread/INFO]: [Shopkeepers] Enabling Shopkeepers v2.23.5
[21:38:50] [Server thread/INFO]: [Shopkeepers] Citizens found: Enabling NPC shopkeepers.
[21:38:50] [Server thread/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[21:38:50] [Server thread/ERROR]: [Shopkeepers] Failed to load the save file! Note: Server downgrades or manually editing the save file are not supported!
com.nisovin.shopkeepers.util.data.persistence.InvalidDataFormatException: Failed to load data as Bukkit config!
	at Shopkeepers-2.23.5.jar/com.nisovin.shopkeepers.util.data.persistence.bukkit.BukkitConfigDataStore.loadFromString(BukkitConfigDataStore.java:63) ~[Shopkeepers-2.23.5.jar:?]
	at Shopkeepers-2.23.5.jar/com.nisovin.shopkeepers.storage.SKShopkeeperStorage.doReload(SKShopkeeperStorage.java:449) ~[Shopkeepers-2.23.5.jar:?]
	at Shopkeepers-2.23.5.jar/com.nisovin.shopkeepers.storage.SKShopkeeperStorage.reload(SKShopkeeperStorage.java:356) ~[Shopkeepers-2.23.5.jar:?]
	at Shopkeepers-2.23.5.jar/com.nisovin.shopkeepers.SKShopkeepersPlugin.onEnable(SKShopkeepersPlugin.java:418) ~[Shopkeepers-2.23.5.jar:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:280) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:649) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:604) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:741) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:486) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:280) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1161) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:308) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: org.bukkit.configuration.InvalidConfigurationException: Could not call method 'public static org.bukkit.inventory.meta.ItemMeta org.bukkit.craftbukkit.inventory.SerializableMeta.deserialize(java.util.Map) throws java.lang.Throwable' of class org.bukkit.craftbukkit.inventory.SerializableMeta for deserialization
	at Shopkeepers-2.23.5.jar/com.nisovin.shopkeepers.util.bukkit.ConfigUtils.loadConfigSafely(ConfigUtils.java:259) ~[Shopkeepers-2.23.5.jar:?]
	at Shopkeepers-2.23.5.jar/com.nisovin.shopkeepers.util.data.persistence.bukkit.BukkitConfigDataStore.loadFromString(BukkitConfigDataStore.java:61) ~[Shopkeepers-2.23.5.jar:?]
	... 15 more
Caused by: java.lang.IllegalStateException: Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}}; Not a list: {modifiers:[],show_in_tooltip:0b}; Not a number; Failed to get element minecraft:levels; Value 0 outside of range [1:255]; Failed to get element minecraft:show_in_tooltip missed input: {levels:{"minecraft:mending":1},show_in_tooltip:0b} missed input: {"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b}} missed input: {"minecraft:container":[{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"一口牛 Angus Beef"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_beef"},slot:0},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"Pork lego guy"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_porkchop"},slot:1},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"鹽酥雞 Popcorn Chicken"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_chicken"},slot:2},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"蒜蓉法包 Baguette"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:bread"},slot:3},{item:{components:{"minecraft:consumable":{consume_seconds:7.0f,on_consume_effects:[{effects:[{duration:60,id:"minecraft:regeneration",show_icon:1b}],type:"minecraft:apply_effects"}]},"minecraft:custom_name":'{"extra":[{"bold":true,"color":"#FFCC00","italic":false,"text":"Mac and Cheese"}],"text":""}',"minecraft:enchantment_glint_override":1b,"minecraft:food":{nutrition:20,saturation:20.0f},"minecraft:lore":['{"extra":[{"color":"gray","italic":false,"text":"用七秒進食以獲得以下效果:"}],"text":""}','{"extra":[{"color":"gray","italic":false,"text":"Take 7 seconds to eat this and gain:"}],"text":""}','""','{"extra":[{"color":"gold","text":"20 Nutrition (full bar of 🍗)"}],"text":""}','{"extra":[{"color":"gold","text":"20 Saturation"}],"text":""}','{"extra":[{"color":"gold","text":"3 seconds of Regeneration I"}],"text":""}','""','{"extra":[{"color":"yellow","italic":false,"text":"娜市鎮零食店"}],"text":""}','{"extra":[{"color":"yellow","italic":false,"text":"Nacity Snacks"}],"text":""}']},count:20,id:"minecraft:raw_gold"},slot:4},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"扭扭薯條 Curly Fries"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:baked_potato"},slot:5},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"羊架 Lamb Rack"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_mutton"},slot:6},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"Pork lego guy"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_porkchop"},slot:7},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"一口牛 Angus Beef"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_beef"},slot:8},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"一口牛 Angus Beef"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_beef"},slot:9},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"Pork lego guy"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_porkchop"},slot:10},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"鹽酥雞 Popcorn Chicken"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_chicken"},slot:11},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"蒜蓉法包 Baguette"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:bread"},slot:12},{item:{components:{"minecraft:consumable":{consume_seconds:7.0f,on_consume_effects:[{effects:[{duration:60,id:"minecraft:regeneration",show_icon:1b}],type:"minecraft:apply_effects"}]},"minecraft:custom_name":'{"extra":[{"bold":true,"color":"#FFCC00","italic":false,"text":"Mac and Cheese"}],"text":""}',"minecraft:enchantment_glint_override":1b,"minecraft:food":{nutrition:20,saturation:20.0f},"minecraft:lore":['{"extra":[{"color":"gray","italic":false,"text":"用七秒進食以獲得以下效果:"}],"text":""}','{"extra":[{"color":"gray","italic":false,"text":"Take 7 seconds to eat this and gain:"}],"text":""}','""','{"extra":[{"color":"gold","text":"20 Nutrition (full bar of 🍗)"}],"text":""}','{"extra":[{"color":"gold","text":"20 Saturation"}],"text":""}','{"extra":[{"color":"gold","text":"3 seconds of Regeneration I"}],"text":""}','""','{"extra":[{"color":"yellow","italic":false,"text":"娜市鎮零食店"}],"text":""}','{"extra":[{"color":"yellow","italic":false,"text":"Nacity Snacks"}],"text":""}']},count:20,id:"minecraft:raw_gold"},slot:13},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"扭扭薯條 Curly Fries"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:baked_potato"},slot:14},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"羊架 Lamb Rack"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_mutton"},slot:15},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"Pork lego guy"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_porkchop"},slot:16},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"一口牛 Angus Beef"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_beef"},slot:17},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"一口牛 Angus Beef"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_beef"},slot:18},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"Pork lego guy"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_porkchop"},slot:19},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"鹽酥雞 Popcorn Chicken"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_chicken"},slot:20},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"蒜蓉法包 Baguette"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:bread"},slot:21},{item:{components:{"minecraft:consumable":{consume_seconds:7.0f,on_consume_effects:[{effects:[{duration:60,id:"minecraft:regeneration",show_icon:1b}],type:"minecraft:apply_effects"}]},"minecraft:custom_name":'{"extra":[{"bold":true,"color":"#FFCC00","italic":false,"text":"Mac and Cheese"}],"text":""}',"minecraft:enchantment_glint_override":1b,"minecraft:food":{nutrition:20,saturation:20.0f},"minecraft:lore":['{"extra":[{"color":"gray","italic":false,"text":"用七秒進食以獲得以下效果:"}],"text":""}','{"extra":[{"color":"gray","italic":false,"text":"Take 7 seconds to eat this and gain:"}],"text":""}','""','{"extra":[{"color":"gold","text":"20 Nutrition (full bar of 🍗)"}],"text":""}','{"extra":[{"color":"gold","text":"20 Saturation"}],"text":""}','{"extra":[{"color":"gold","text":"3 seconds of Regeneration I"}],"text":""}','""','{"extra":[{"color":"yellow","italic":false,"text":"娜市鎮零食店"}],"text":""}','{"extra":[{"color":"yellow","italic":false,"text":"Nacity Snacks"}],"text":""}']},count:20,id:"minecraft:raw_gold"},slot:22},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"扭扭薯條 Curly Fries"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:baked_potato"},slot:23},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"羊架 Lamb Rack"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_mutton"},slot:24},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"Pork lego guy"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_porkchop"},slot:25},{item:{components:{"minecraft:attribute_modifiers":{modifiers:[],show_in_tooltip:0b},"minecraft:custom_name":'{"color":"#7F4A0D","italic":false,"text":"一口牛 Angus Beef"}',"minecraft:enchantments":{levels:{"minecraft:mending":1},show_in_tooltip:0b},"minecraft:lore":['{"color":"yellow","italic":false,"text":"娜市鎮零食店"}','{"color":"yellow","italic":false,"text":"Nacity Snacks"}']},count:64,id:"minecraft:cooked_beef"},slot:26}]}
	at com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:287) ~[datafixerupper-8.0.16.jar:?]
	at com.mojang.serialization.DataResult.getOrThrow(DataResult.java:81) ~[datafixerupper-8.0.16.jar:?]
	at org.bukkit.craftbukkit.inventory.CraftMetaBlockState.lambda$deserializeInternal$4(CraftMetaBlockState.java:194) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at java.base/java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
	at org.bukkit.craftbukkit.inventory.CraftMetaBlockState.deserializeInternal(CraftMetaBlockState.java:193) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at org.bukkit.craftbukkit.inventory.CraftMetaItem.<init>(CraftMetaItem.java:751) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at org.bukkit.craftbukkit.inventory.CraftMetaBlockState.<init>(CraftMetaBlockState.java:135) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?]
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?]
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
	at org.bukkit.craftbukkit.inventory.SerializableMeta.deserialize(SerializableMeta.java:80) ~[paper-1.21.5.jar:1.21.5-56-1acf3b3]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
	at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
	at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeViaMethod(ConfigurationSerialization.java:87) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.configuration.serialization.ConfigurationSerialization.deserialize(ConfigurationSerialization.java:129) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeObject(ConfigurationSerialization.java:209) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:58) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264) ~[snakeyaml-2.2.jar:?]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247) ~[snakeyaml-2.2.jar:?]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:576) ~[snakeyaml-2.2.jar:?]
	at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:210) ~[snakeyaml-2.2.jar:?]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:552) ~[snakeyaml-2.2.jar:?]
	at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:597) ~[snakeyaml-2.2.jar:?]
	at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:49) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264) ~[snakeyaml-2.2.jar:?]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247) ~[snakeyaml-2.2.jar:?]
	at org.bukkit.configuration.file.YamlConstructor.construct(YamlConstructor.java:37) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:164) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:162) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:162) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:162) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:121) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
	at Shopkeepers-2.23.5.jar/com.nisovin.shopkeepers.util.bukkit.ConfigUtils.loadConfigSafely(ConfigUtils.java:254) ~[Shopkeepers-2.23.5.jar:?]
	at Shopkeepers-2.23.5.jar/com.nisovin.shopkeepers.util.data.persistence.bukkit.BukkitConfigDataStore.loadFromString(BukkitConfigDataStore.java:61) ~[Shopkeepers-2.23.5.jar:?]
	... 15 more
[21:38:50] [Server thread/ERROR]: [Shopkeepers] Detected an issue during the loading of the saved shopkeepers data! Disabling the plugin!
[21:38:50] [Server thread/INFO]: [Shopkeepers] Disabling Shopkeepers v2.23.5
commented

Please attach your save.yml file.

However, my current guess is that the issue is related to:

In that case, there is not much I can currently do in the plugin. And I am also not sure if this will be fixed on the Paper side: In the 1.21.5+ versions of Paper, items are now serialized in a new format that should properly pass the data through Minecraft's data updater during deserialization now. But this only really helps you going forward. I am not sure how difficulty it would be for Paper, or how interested they would be, to fix this backwards compatibility issue coming from older versions.

Another option would be for you to manually delete all items/trades affected by this issue from the save file.

commented

This is the original save file.
This is the working converted save file.

Indeed, it is due to backwards compatibility issue with item serialization. As it was too much for me to manually recreate in game, I've taken this approach to convert the data file:

  1. Convert all item stacks entries in the save.yml to NBT strings on 1.21.4
  2. Read those NBT back in on 1.21.5 and apply the data fixer 4189 -> 4325
  3. Then load those converted NBT into item stacks
  4. Apply them back into the save.yml in the new 1.21.5 format

This leads me to think, perhaps it would be even better for Shopkeepers to save item data using NBT strings going forward as you can always count on the vanilla data fixer to be backwards compatible. Since there are already version-dependent modules, implementing them wouldn't be too difficult. It also has the added benefit of making sure items players uses in the world and the one used in a Shopkeeper will continue to match 100% after version upgrades.

commented

[...]I've taken this approach to convert the data file:

1. Convert all item stacks entries in the `save.yml` to NBT strings on 1.21.4

2. Read those NBT back in on 1.21.5 and apply the data fixer 4189 -> 4325

3. Then load those converted NBT into item stacks

4. Apply them back into the `save.yml` in the new 1.21.5 format

Hey, can you share a gist of the code that did this? I am stuck upgrading shopkeepers for the same reason, it seems there's a bunch of enchanted items that are affected as well.

Exact error if needed
Caused by: java.lang.IllegalStateException: Not a number; Failed to get element minecraft:levels missed input: {levels:{"minecraft:protection":1}} missed input: {"minecraft:enchantments":{levels:{"minecraft:protection":1}}}; Not a number; Failed to get element minecraft:levels missed input: {levels:{"minecraft:blast_protection":2}} missed input: {"minecraft:enchantments":{levels:{"minecraft:blast_protection":2}}}; Not a number; Failed to get element minecraft:levels missed input: {levels:{"minecraft:protection":2,"minecraft:unbreaking":3}} missed input: {"minecraft:enchantments":{levels:{"minecraft:protection":2,"minecraft:unbreaking":3}}}; Not a number; Failed to get element minecraft:levels missed input: {levels:{"minecraft:unbreaking":2}} missed input: {"minecraft:enchantments":{levels:{"minecraft:unbreaking":2}}}; Not a number; Failed to get element minecraft:levels missed input: {levels:{"minecraft:efficiency":3}} missed input: {"minecraft:enchantments":{levels:{"minecraft:efficiency":3}}}; Not a number; Failed to get element minecraft:levels missed input: {levels:{"minecraft:unbreaking":2}} missed input: {"minecraft:enchantments":{levels:{"minecraft:unbreaking":2}}}; Not a number; Failed to get element minecraft:levels missed input: {levels:{"minecraft:efficiency":2}} missed input: {"minecraft:enchantments":{levels:{"minecraft:efficiency":2}}} missed input: {"minecraft:container":[{item:{count:1,id:"minecraft:shield"},slot:0},{item:{components:{"minecraft:enchantments":{levels:{"minecraft:efficiency":2}}},count:1,id:"minecraft:diamond_pickaxe"},slot:1},{item:{components:{"minecraft:enchantments":{levels:{"minecraft:unbreaking":2}}},count:1,id:"minecraft:diamond_axe"},slot:2},{item:{components:{"minecraft:enchantments":{levels:{"minecraft:efficiency":3}}},count:1,id:"minecraft:diamond_shovel"},slot:3},{item:{components:{"minecraft:enchantments":{levels:{"minecraft:unbreaking":2}}},count:1,id:"minecraft:diamond_helmet"},slot:4},{item:{components:{"minecraft:enchantments":{levels:{"minecraft:protection":2,"minecraft:unbreaking":3}}},count:1,id:"minecraft:diamond_chestplate"},slot:5},{item:{components:{"minecraft:enchantments":{levels:{"minecraft:blast_protection":2}}},count:1,id:"minecraft:diamond_leggings"},slot:6},{item:{components:{"minecraft:enchantments":{levels:{"minecraft:protection":1}}},count:1,id:"minecraft:diamond_boots"},slot:7}]}
commented

Sure, here's the snippets. Please excuse if they don't follow standard practices, as I just threw them together quickly to get it to work.

Run these on 1.21.4:

FileConfiguration src = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "save.yml"));
FileConfiguration dst = new YamlConfiguration();

for (String key : src.getValues(true).keySet()) {
	try {
		ItemStack itemStack = src.getItemStack(key);
		if (itemStack == null) {
			throw new Exception();
		}
		dst.set(key, "ITEM:" + getNMSItemStackJson(itemStack));
	} catch (Throwable e) {
		dst.set(key, src.get(key));
	}
}

try {
	dst.save(new File(getDataFolder(), "converted.yml"));
} catch (IOException e) {
	throw new RuntimeException(e);
}
public String getNMSItemStackJson(ItemStack itemStack) {
	IRegistryCustom registryAccess = ((CraftWorld) Bukkit.getWorlds().get(0)).getHandle().L_();
	NBTTagCompound nbtTagCompound = new NBTTagCompound();
	net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
	NBTBase nbt = nmsItemStack.b(registryAccess, nbtTagCompound);
	return nbt.toString();
}

Run these on 1.21.5:

FileConfiguration src = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "save.yml"));
FileConfiguration dst = new YamlConfiguration();

for (String key : src.getValues(true).keySet()) {
	try {
		String value = src.getString(key);
		if (value == null || !value.startsWith("ITEM:")) {
			throw new Exception();
		}
		String nbt = value.substring("ITEM:".length());
		try {
			dst.set(key, getItemFromNBTJson(nbt));
		} catch (Throwable e) {
			e.printStackTrace();
			throw e;
		}
	} catch (Throwable e) {
		dst.set(key, src.get(key));
	}
}

try {
	dst.save(new File(getDataFolder(), "converted.yml"));
} catch (IOException e) {
	throw new RuntimeException(e);
}
public ItemStack getItemFromNBTJson(String json) {
	try {
		IRegistryCustom registryAccess = ((CraftWorld) Bukkit.getWorlds().get(0)).getHandle().J_();
		NBTTagCompound nbtTagCompound = MojangsonParser.a(json);
		Dynamic<NBTBase> result = DataConverterRegistry.a().update(DataConverterTypes.t, new Dynamic<>(DynamicOpsNBT.a, nbtTagCompound), 4189, 4325);
		net.minecraft.world.item.ItemStack itemStack = net.minecraft.world.item.ItemStack.a(registryAccess, result.getValue()).orElseThrow(RuntimeException::new);
		return CraftItemStack.asCraftMirror(itemStack);
	} catch (CommandSyntaxException e) {
		throw new RuntimeException(e);
	}
}
commented

This leads me to think, perhaps it would be even better for Shopkeepers to save item data using NBT strings going forward as you can always count on the vanilla data fixer to be backwards compatible. Since there are already version-dependent modules, implementing them wouldn't be too difficult. It also has the added benefit of making sure items players uses in the world and the one used in a Shopkeeper will continue to match 100% after version upgrades.

Yeah, I will definitely consider this. Edit: However, this would likely require dropping support for the "fallback" mode then (so far the plugin was still able to run in a slightly limited form even when no compatible NMS module is found).

Starting with 1.21.5, Paper should already serialize items as SNBT by defaut now. And on Spigot, the deserialization is implemented differently, so I am not sure if this particular issues affects Spigot currently (though, I think they are also affected by the general issue of not passing old serialized data through the proper MC datafixer).

commented

I have changed how the Shopkeepers plugin serializes item stacks. The new format is very similar to Paper's 1.21.5 format, but has some minor benefits (better error messages when something goes wrong, mentioning the involved shopkeeper and trade; compatibility across server variants; ...)

A snapshot version can be found here: https://github.com/Shopkeepers/Shopkeepers/actions/runs/14961342930/artifacts/3102609659

In order to resolve the issue mentioned in this ticket, it is required to run the new version before upgrading the server to 1.21.5. Also note that the issue is not observed on Spigot servers.

Please test the snapshot version linked above and report back any issues. Be sure to backup the save.yml file in case something goes wrong.

commented

Quick note: The solution mentioned in this ticket should also resolve other similar 1.21.5 migration issues, such as for container items containing enchanted items (the format for enchantments has changed in 1.21.5)