NBT-API

NBT-API

98.9k Downloads

Crash on startup - Paper 1.21

Nikkilectric opened this issue ยท 2 comments

commented

Here's the error I get when starting the latest version of NBTApi on my server after updating to paper 1.21

java.lang.ExceptionInInitializerError: null
	at item-nbt-api-plugin-2.13.0.jar/de.tr7zw.nbtapi.NBTCompound.setString(NBTCompound.java:176) ~[item-nbt-api-plugin-2.13.0.jar:?]
	at item-nbt-api-plugin-2.13.0.jar/de.tr7zw.nbtapi.plugin.tests.compounds.GetterSetterTest.test(GetterSetterTest.java:36) ~[item-nbt-api-plugin-2.13.0.jar:?]
	at item-nbt-api-plugin-2.13.0.jar/de.tr7zw.nbtapi.plugin.NBTAPI.onEnable(NBTAPI.java:193) ~[item-nbt-api-plugin-2.13.0.jar:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.21.jar:1.21-6-126f6d7]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.21.jar:1.21-6-126f6d7]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:629) ~[paper-1.21.jar:1.21-6-126f6d7]
	at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:578) ~[paper-1.21.jar:1.21-6-126f6d7]
	at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:690) ~[paper-1.21.jar:1.21-6-126f6d7]
	at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:452) ~[paper-1.21.jar:1.21-6-126f6d7]
	at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:327) ~[paper-1.21.jar:1.21-6-126f6d7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1157) ~[paper-1.21.jar:1.21-6-126f6d7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.jar:1.21-6-126f6d7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "pk" is null
	at java.base/java.util.ImmutableCollections$MapN.probe(ImmutableCollections.java:1328) ~[?:?]
	at java.base/java.util.ImmutableCollections$MapN.get(ImmutableCollections.java:1242) ~[?:?]
	at java.base/java.util.ImmutableCollections$AbstractImmutableMap.getOrDefault(ImmutableCollections.java:1097) ~[?:?]
	at io.papermc.paper.pluginremap.reflect.PaperReflection.mapDeclaredFieldName(PaperReflection.java:81) ~[paper-1.21.jar:1.21-6-126f6d7]
	at io.papermc.reflectionrewriter.runtime.AbstractDefaultRulesReflectionProxy.getDeclaredField(AbstractDefaultRulesReflectionProxy.java:90) ~[reflection-rewriter-runtime-0.0.1.jar:?]
	at io.papermc.paper.pluginremap.reflect.PaperReflectionHolder.getDeclaredField(Unknown Source) ~[paper-1.21.jar:1.21-6-126f6d7]
	at item-nbt-api-plugin-2.13.0.jar/de.tr7zw.nbtapi.NBTReflectionUtil.<clinit>(NBTReflectionUtil.java:59) ~[item-nbt-api-plugin-2.13.0.jar:?]
	... 15 more
commented

Can reproduce, same error with NBTCompound.setString.

commented

Duplicate #284