NBT-API

NBT-API

98.9k Downloads

Two errors in version 1.7.10

Roinflam opened this issue ยท 9 comments

commented

First
Error message
[18:28:18 ERROR]: Could not pass event PlayerInteractEvent to CustomChunkLimit v1.5.0 org.bukkit.event.EventException at cc.uraniummc.eventexecutor.EventExecutorImp.execute(EventExecutorImp.java:25) ~[EventExecutorImp.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[RegisteredListener.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:508) [SimplePluginManager.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:493) [SimplePluginManager.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:224) [CraftEventFactory.class:1.7.10-R0.1-SNAPSHOT] at net.minecraft.server.management.ItemInWorldManager.func_73078_a(ItemInWorldManager.java:428) [mx.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147346_a(NetHandlerPlayServer.java:771) [nh.class:?] at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:60) [jo.class:?] at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:9) [jo.class:?] at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:245) [ej.class:?] at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:176) [nc.class:?] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:989) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:458) [lt.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:806) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:665) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_251] Caused by: java.lang.NoSuchMethodError: org.bukkit.block.BlockState.isPlaced()Z at de.tr7zw.nbtapi.NBTTileEntity.<init>(NBTTileEntity.java:28) ~[?:?] at com.tany.customchunklimit.listenevent.Event.Interact(Event.java:85) ~[?:?] at com.tany.customchunklimit.listenevent.Event_70_Interact_PlayerInteractEvent.invoke(Uranium) ~[?:?] at cc.uraniummc.eventexecutor.EventExecutorImp.execute(EventExecutorImp.java:23) ~[EventExecutorImp.class:1.7.10-R0.1-SNAPSHOT] ... 15 more

My Code
NBTTileEntity tile = new NBTTileEntity(evt.getClickedBlock().getState());

The second
Error message
[18:39:32 ERROR]: Could not pass event InventoryClickEvent to SlashbladeSetRewrite v1.0.0 org.bukkit.event.EventException at cc.uraniummc.eventexecutor.EventExecutorImp.execute(EventExecutorImp.java:25) ~[EventExecutorImp.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[RegisteredListener.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:508) [SimplePluginManager.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:493) [SimplePluginManager.class:1.7.10-R0.1-SNAPSHOT] at net.minecraft.network.NetHandlerPlayServer.func_147351_a(NetHandlerPlayServer.java:1706) [nh.class:?] at net.minecraft.network.play.client.C0EPacketClickWindow.func_148833_a(SourceFile:32) [ix.class:?] at net.minecraft.network.play.client.C0EPacketClickWindow.func_148833_a(SourceFile:10) [ix.class:?] at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:245) [ej.class:?] at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:176) [nc.class:?] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:989) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:458) [lt.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:806) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:665) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_251] Caused by: java.lang.NoClassDefFoundError: Could not initialize class de.tr7zw.nbtapi.utils.nmsmappings.ReflectionMethod at de.tr7zw.nbtapi.NBTCompound.getInteger(NBTCompound.java:151) ~[?:?] at com.tany.slashbladesetrewrite.listenevent.Event.Click(Event.java:145) ~[?:?] at com.tany.slashbladesetrewrite.listenevent.Event_82_Click_InventoryClickEvent.invoke(Uranium) ~[?:?] at cc.uraniummc.eventexecutor.EventExecutorImp.execute(EventExecutorImp.java:23) ~[EventExecutorImp.class:1.7.10-R0.1-SNAPSHOT] ... 13 more

My Code
int repaircounter = itemnbt.getInteger("RepairCounter");

commented

1.7.10 should work better with the latest build (2.5.0-SNAPSHOT). There is stuff that 1.7.10 just doesn't support (merging compounds, gameprofiles, gson without adding it, lists are barely working etc), but normal Items/Compounds/Files/Tiles/Entities should now work (and the plugin load without exceptions^^).

commented

Could not pass event PlayerInteractEvent to CustomChunkLimit v1.5.1 org.bukkit.event.EventException at cc.uraniummc.eventexecutor.EventExecutorImp.execute(EventExecutorImp.java:25) ~[EventExecutorImp.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[RegisteredListener.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:508) [SimplePluginManager.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:493) [SimplePluginManager.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:224) [CraftEventFactory.class:1.7.10-R0.1-SNAPSHOT] at net.minecraft.server.management.ItemInWorldManager.func_73078_a(ItemInWorldManager.java:428) [mx.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147346_a(NetHandlerPlayServer.java:771) [nh.class:?] at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:60) [jo.class:?] at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:9) [jo.class:?] at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:245) [ej.class:?] at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:176) [nc.class:?] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:989) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:458) [lt.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:806) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:665) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_251] Caused by: java.lang.NoClassDefFoundError: Could not initialize class de.tr7zw.nbtapi.utils.nmsmappings.ReflectionMethod at de.tr7zw.nbtapi.NBTReflectionUtil.getTileEntityNBTTagCompound(NBTReflectionUtil.java:221) ~[?:?] at de.tr7zw.nbtapi.NBTTileEntity.getCompound(NBTTileEntity.java:36) ~[?:?] at de.tr7zw.nbtapi.NBTCompound.asNBTString(NBTCompound.java:742) ~[?:?] at de.tr7zw.nbtapi.NBTCompound.toString(NBTCompound.java:714) ~[?:?] at pers.tany.customchunklimit.listenevent.Event.Interact(Event.java:86) ~[?:?] at pers.tany.customchunklimit.listenevent.Event_73_Interact_PlayerInteractEvent.invoke(Uranium) ~[?:?] at cc.uraniummc.eventexecutor.EventExecutorImp.execute(EventExecutorImp.java:23) ~[EventExecutorImp.class:1.7.10-R0.1-SNAPSHOT] ... 15 more

[13:16:42 ERROR]: null org.bukkit.command.CommandException: Unhandled exception executing command 'ssr' in plugin SlashbladeSetRewrite v1.0.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[PluginCommand.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) ~[SimpleCommandMap.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:722) ~[CraftServer.class:1.7.10-R0.1-SNAPSHOT] at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:1165) [nh.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:995) [nh.class:?] at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:38) [ir.class:?] at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:53) [ir.class:?] at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:245) [ej.class:?] at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:176) [nc.class:?] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:989) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:458) [lt.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:806) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:665) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_251] Caused by: java.lang.NoClassDefFoundError: Could not initialize class de.tr7zw.nbtapi.utils.nmsmappings.ReflectionMethod at de.tr7zw.nbtapi.NBTCompound.setInteger(NBTCompound.java:135) ~[?:?] at pers.tany.slashbladesetrewrite.command.Commands.onCommand(Commands.java:595) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[PluginCommand.class:1.7.10-R0.1-SNAPSHOT] ... 13 more

There are still problems and cannot be used normally

commented

"Could not initialize class de.tr7zw.nbtapi.utils.nmsmappings.ReflectionMethod" Are you sure you used the 2.5.0-SNAPSHOT (not yet on spigotmc)? You can download that version here.

commented

I tried it with Spigot and it really works. Then I updated my previous core and it can be used normally.
Thank you very much !Orz

commented

Yes, I am using version 2.5.0-SNAPSHOT

This is an error at enable
Error occurred while enabling NBTAPI v2.5.0-SNAPSHOT (Is it up to date?) java.lang.ExceptionInInitializerError at de.tr7zw.nbtapi.plugin.NBTAPI.onEnable(NBTAPI.java:159) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[JavaPlugin.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:384) [JavaPluginLoader.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410) [SimplePluginManager.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:420) [CraftServer.class:1.7.10-R0.1-SNAPSHOT] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:352) [CraftServer.class:1.7.10-R0.1-SNAPSHOT] at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:507) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:481) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:441) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:353) [lt.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:627) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_251] Caused by: java.lang.NullPointerException at de.tr7zw.nbtapi.utils.nmsmappings.ReflectionMethod.<init>(ReflectionMethod.java:137) ~[?:?] at de.tr7zw.nbtapi.utils.nmsmappings.ReflectionMethod.<init>(ReflectionMethod.java:142) ~[?:?] at de.tr7zw.nbtapi.utils.nmsmappings.ReflectionMethod.<clinit>(ReflectionMethod.java:22) ~[?:?] ... 12 more

commented

I've done a small change so it doesn't NPE at that point, now it should print an error message with more information, and not completely fail. Just to make sure: your server is a normal spigot/paper/bukkit server, not odd forge combination like cauldron?

commented

Huh so it was some odd fork like cauldron?

commented

Yes, also Bukkit+Forge

commented

Yea nbtapi is incompatible with that, because these jars use different nms mappings.