flinbein / PowerNBT

[MineCraft] Minecraft PowerNBT plugin
https://www.spigotmc.org/resources/powernbt.9098/
MIT License
39 stars 25 forks source link

Error by using NBTBlockUtils #24

Closed rubenvde closed 7 years ago

rubenvde commented 7 years ago

I have a Cauldron server running on 1.7.10 but when I start the server there is already a error from PowerNBT which says:

java.lang.ExceptionInInitializerError - java.lang.RuntimeException: no such method: [suffix:load,types:[class net.minecraft.nbt.NBTTagCompound]] for class net.minecraft.tileentity.TileEntity

But after the error the plugins still works the commands are working, but after I want to instantiate a new NBTManager with the API in my own plugin the hole thing breaks and says:

java.lang.NoClassDefFoundError: Could not initialize class me.dpohvar.powernbt.utils.NBTBlockUtils

Can someone help me? Would love to create something with this plugin.

DPOH-VAR commented 7 years ago

You can try older versions https://www.spigotmc.org/resources/powernbt.9098/updates (0.8.9 - latest) https://dev.bukkit.org/projects/powernbt/files (0.1 - 0.8.2 beta) maybe 0.7.3 will work

or wait until i fix this problem

rubenvde commented 7 years ago

Sadly version 0.7.3 will give right on the start this error:

java.lang.ExceptionInInitializerError - java.lang.RuntimeException: no such method at me.dpohvar.powernbt.utils.ReflectionUtils$RefClass.findMethod(ReflectionUtils.java:278) ~[?:?]

And after an API call

java.lang.NoSuchMethodError: me.dpohvar.powernbt.PowerNBT.getApi()Lme/dpohvar/powernbt/api/NBTManager;

I think I have to wait for your fix. Hope you can figure out something soon. Thanks in advance.

DPOH-VAR commented 7 years ago

maybe I fixed it try http://repo.varscript.ru/release/me/dpohvar/powernbt/PowerNBT/0.8.9.1%20SNAPSHOT/

If everything is OK, I'll merge it to master

rubenvde commented 7 years ago

It looks like you fixed it man. Thank you!

akashagarwal7 commented 7 years ago

Is 0.8.9.1 supposed to work properly with spigot 1.11.2? I'm still getting both of the errors as @rubenvde stated. On server start: Caused by: java.lang.RuntimeException: no such method: [suffix:load,types:[class net.minecraft.server.v1_11_R1.NBTTagCompound], suffix:a,forge:true,types:[class net.minecraft.server.v1_11_R1.NBTTagCompound]] for class net.minecraft.server.v1_11_R1.TileEntity

Inside my plugin: Caused by: java.lang.NoClassDefFoundError: Could not initialize class me.dpohvar.powernbt.utils.NBTBlockUtils at me.dpohvar.powernbt.api.NBTManager.<init>(NBTManager.java:41) ~[?:?]

DPOH-VAR commented 7 years ago

@akashaggarwal7 Does version 0.8.9 work on spigot 1.11.2 without errors? https://github.com/DPOH-VAR/PowerNBT/commit/fe8c74aaddfd75bd56335050d3c84b7980003d41 should not have affected spigot. I wll check it a bit later

akashagarwal7 commented 7 years ago

@DPOH-VAR The problem exists in 0.8.9 as well, I tried with 5e28d24.

DPOH-VAR commented 7 years ago

http://repo.varscript.ru/release/me/dpohvar/powernbt/PowerNBT/0.8.9.2/PowerNBT-0.8.9.2.jar