Shopkeepers

Shopkeepers

2M Downloads

Playerheads with custom skin / uuid run into error when editing Villager

blablubbabcDEV opened this issue · 3 comments

commented

Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/343

Originally posted by Bastikeks (Sep 27, 2015):

Shopkeeper Version: Shopkeepers v1.63
When editing a shopkeeper and adding a custom player head and then exiting (via ESC) the console throws an error and the content of save.yml file gets cleared completely.
here is the stack trace:
[18:33:47 WARN]: Exception in thread "Craft Scheduler Thread - 17"
[18:33:47 WARN]: org.apache.commons.lang.UnhandledException: Plugin Shopkeepers v1.63 generated an exception while executing task 37312
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException: null value in entry: skull-owner=null
at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:33)
at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:135)
at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:206)
at org.bukkit.craftbukkit.v1_8_R1.inventory.CraftMetaSkull.serialize(CraftMetaSkull.java:150)
at org.bukkit.craftbukkit.v1_8_R1.inventory.CraftMetaItem.serialize(CraftMetaItem.java:842)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSerializable.representData(YamlRepresenter.java:33)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSerializable.representData(YamlRepresenter.java:35)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSection.representData(YamlRepresenter.java:23)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSection.representData(YamlRepresenter.java:23)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSection.representData(YamlRepresenter.java:23)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.represent(BaseRepresenter.java:65)
at org.yaml.snakeyaml.Yaml.dumpAll(Yaml.java:271)
at org.yaml.snakeyaml.Yaml.dumpAll(Yaml.java:262)
at org.yaml.snakeyaml.Yaml.dumpAll(Yaml.java:234)
at org.yaml.snakeyaml.Yaml.dump(Yaml.java:209)
at org.bukkit.configuration.file.YamlConfiguration.saveToString(YamlConfiguration.java:40)
at com.nisovin.shopkeepers.ShopkeepersPlugin.saveDataToFile(ShopkeepersPlugin.java:1390)
at com.nisovin.shopkeepers.ShopkeepersPlugin.access$1200(ShopkeepersPlugin.java:62)
at com.nisovin.shopkeepers.ShopkeepersPlugin$11.run(ShopkeepersPlugin.java:1300)
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java:71)
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more

This is the playerhead we tried to add (This is a custom skull with custom skin-url):
[at]command /give [at]p minecraft:skull 1 3 {display:{Name:"§fCustomSkull"},SkullOwner:{Id:ca292d4d-bcb4-59ce-1e6e-3ff99b5d418f,Properties:{textures:[{Value:eyJ0aW1lc3RhbXAiOjE0MzQ5NDk3MTQ4ODIsInByb2ZpbGVJZCI6IjUwNzk4YjJhN2QxYjQxYTRiNmFlYzRiNWUwOWJjMTcxIiwicHJvZmlsZU5hbWUiOiJFbHN3ZXlyIiwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2JmNWI3NTk2MWY3MmYxNDBkYTUyMWYzZmUyNjI3MzNhYWVhMDZiYjQzOWEzOGNkNjdmYzMxODlkYTZiNWIwIn19fQ== }]}}}

It seems that the plugin cant find the skullowner tag...

commented

Originally commented by IrusVirus (Sep 27, 2015):

same problem

commented

Originally commented by blablubbabc (Sep 27, 2015):

Duplicate of this closed ticket.
This is somthing the spigot team has to fix. I created a spigot ticket for it here.

        Edited Sep 27, 2015
commented

Originally closed by blablubbabc (Sep 27, 2015)