PluginBugs / Issues-EpicBackpacks

Repository used to keep track of issues of my plugin EpicBackpacks
1 stars 2 forks source link

[BUG] Portable bags do not support custom nbt texture heads #19

Closed GeistFighter closed 3 years ago

GeistFighter commented 3 years ago

Describe the bug Portable bags do not support custom nbt texture heads

To Reproduce Steps to reproduce the behavior:

  1. Go to your Portable bags
  2. Open it
  3. Place a head with nbt custom texture
  4. Close and open

Expected behavior To be able to make it possible to put this kind of object in the bags.

Screenshots image

Info (please complete the following information):

If we put a head with nbt custom in the /ebp it stays there unlike the handbag but an error in the console happens

[20:48:39 ERROR]: Could not pass event InventoryCloseEvent to EpicBackpacks v1.3.1 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [server.jar:git-Spigot-db6de12-18fbb24] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [server.jar:git-Spigot-db6de12-18fbb24] at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:852) [server.jar:git-Spigot-db6de12-18fbb24] at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1411) [server.jar:git-Spigot-db6de12-18fbb24] at net.minecraft.server.v1_8_R3.PacketPlayInCloseWindow.a(PacketPlayInCloseWindow.java:18) [server.jar:git-Spigot-db6de12-18fbb24] at net.minecraft.server.v1_8_R3.PacketPlayInCloseWindow.a(PacketPlayInCloseWindow.java:1) [server.jar:git-Spigot-db6de12-18fbb24] at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [server.jar:git-Spigot-db6de12-18fbb24] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_282] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_282] at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [server.jar:git-Spigot-db6de12-18fbb24] at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [server.jar:git-Spigot-db6de12-18fbb24] at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [server.jar:git-Spigot-db6de12-18fbb24] at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [server.jar:git-Spigot-db6de12-18fbb24] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [server.jar:git-Spigot-db6de12-18fbb24] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282] Caused by: java.lang.NullPointerException: null value in entry: skull-owner=null at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:33) ~[server.jar:git-Spigot-db6de12-18fbb24] at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:135) ~[server.jar:git-Spigot-db6de12-18fbb24] at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:206) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.bukkit.craftbukkit.v1_8_R3.inventory.CraftMetaSkull.serialize(CraftMetaSkull.java:173) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.bukkit.craftbukkit.v1_8_R3.inventory.CraftMetaItem.serialize(CraftMetaItem.java:850) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSerializable.representData(YamlRepresenter.java:33) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:94) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:156) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:304) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSerializable.representData(YamlRepresenter.java:35) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:94) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:156) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:304) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:94) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.representer.BaseRepresenter.represent(BaseRepresenter.java:64) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.Yaml.dumpAll(Yaml.java:242) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.Yaml.dumpAll(Yaml.java:206) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.yaml.snakeyaml.Yaml.dump(Yaml.java:181) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.bukkit.configuration.file.YamlConfiguration.saveToString(YamlConfiguration.java:40) ~[server.jar:git-Spigot-db6de12-18fbb24] at org.bukkit.configuration.file.FileConfiguration.save(FileConfiguration.java:103) ~[server.jar:git-Spigot-db6de12-18fbb24] at dev.lone.EpicBackpacks.d.b(Unknown Source) ~[?:?] at sun.reflect.GeneratedMethodAccessor520.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_282] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_282] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[server.jar:git-Spigot-db6de12-18fbb24] ... 16 more

LoneDev6 commented 3 years ago

Sorry I don't understand what is the issue, make a video if you can

GeistFighter commented 3 years ago

https://user-images.githubusercontent.com/42804270/111185993-dccc9500-85b2-11eb-9365-326cd24e4d27.mp4

It is basically impossible to store heads modified by a custom texture

LoneDev6 commented 3 years ago

Ohhhhh I see the problem, thanks I will check and fix the issue

LoneDev6 commented 3 years ago

Seems a bug of the plugin you're using, please ask the author to add skull-owner NBT attribute to the item. This bug will also happen on other plugins that save custom heads in files.

Error: null value in entry: skull-owner=null

GeistFighter commented 3 years ago

nbt "{CustomDurability:500,display:{Name:&6Détécteur},SkullOwner:{Id:""4c66c6e4-a71a-40c8-bd67-3eeaa6f7aafb"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjlkZjVlNmRkNTk5MWM5OTM2ODFiOWU2ODk3MzQ0MGE4YjJjODUyMzAwNmU1NzhkMWZkMGJkMzQyODI2MWJjIn19fQ==""}]}}}"

GeistFighter commented 3 years ago

I use a skript, the skullownerID is well defined though?

LoneDev6 commented 3 years ago

this is very strange, can you try to use the Essentials command /skull Notch then put the skull inside backpack and check if the error occurs?

GeistFighter commented 3 years ago

I can't place the head (/skull Notch) in the bag (it looks like the protection not to put bags in bags).

GeistFighter commented 3 years ago

EDIT: A mistake on my part, I can put a head generated with /skull notch in a bag .

GeistFighter commented 3 years ago

But if I use the heads of the plugins HDB https://www.spigotmc.org/resources/head-database.14280/ it doesn't work, like for my skript.

GeistFighter commented 3 years ago

Use this site (which I use) to generate the heads on your side via a commandblock.

exemple: https://minecraft-heads.com/custom-heads/humans/43051-jack-sparrow

LoneDev6 commented 3 years ago

It's very strange, I suspect it's a 1.8 bug they fixed in most recent Spigot versions, since I use the Spigot builtin function to save items into files.

can you try downloading Spigot from here? let me know if it fixes the issue https://serverjars.com/jars/servers/paper/paper-1.8.8.jar

GeistFighter commented 3 years ago

It works!

Thank you for your help and the time spent helping me!

LoneDev6 commented 3 years ago

it's okay, no worries! I hope you will leave a good review :D