gonalez / znpcs

New version of znpcs plugin. A spigot/bukkit plugin to create npcs
https://www.spigotmc.org/resources/znpcs.80940
Apache License 2.0
51 stars 25 forks source link

Error in 1.20.6 #105

Closed adydetra closed 1 month ago

adydetra commented 5 months ago

Please compatible in 1.20.6

Tested on Aternos

[06:21:50 INFO]: [ServersNPC] Enabling ServersNPC v4.6
[06:21:50 ERROR]: Error occurred while enabling ServersNPC v4.6 (Is it up to date?)
java.lang.ExceptionInInitializerError: null
    at znpcs-4.6.jar/io.github.gonalez.znpcs.cache.CachePackage.<clinit>(CachePackage.java:7) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.cache.CacheRegistry.<clinit>(CacheRegistry.java:16) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.commands.Command.<clinit>(Command.java:31) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.ServersNPC.onEnable(ServersNPC.java:71) ~[znpcs-4.6.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:519) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:604) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:553) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:675) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:437) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:323) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1136) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
    at znpcs-4.6.jar/io.github.gonalez.znpcs.utility.Utils.getBukkitPackage(Utils.java:50) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.utility.Utils.<clinit>(Utils.java:25) ~[znpcs-4.6.jar:?]
    ... 16 more
[06:21:50 INFO]: [ServersNPC] Disabling ServersNPC v4.6
[06:21:50 ERROR]: Error occurred while disabling ServersNPC v4.6
java.lang.NoClassDefFoundError: Could not initialize class io.github.gonalez.znpcs.cache.CacheRegistry
    at znpcs-4.6.jar/io.github.gonalez.znpcs.npc.NPCType.<clinit>(NPCType.java:19) ~[znpcs-4.6.jar:?]
    at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method) ~[?:?]
    at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160) ~[?:?]
    at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:300) ~[?:?]
    at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newFieldAccessor(MethodHandleAccessorFactory.java:140) ~[?:?]
    at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:145) ~[?:?]
    at java.base/java.lang.reflect.Field.acquireOverrideFieldAccessor(Field.java:1200) ~[?:?]
    at java.base/java.lang.reflect.Field.getOverrideFieldAccessor(Field.java:1169) ~[?:?]
    at java.base/java.lang.reflect.Field.get(Field.java:444) ~[?:?]
    at com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.<init>(TypeAdapters.java:886) ~[gson-2.10.1.jar:?]
    at com.google.gson.internal.bind.TypeAdapters$29.create(TypeAdapters.java:930) ~[gson-2.10.1.jar:?]
    at com.google.gson.Gson.getAdapter(Gson.java:556) ~[gson-2.10.1.jar:?]
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160) ~[gson-2.10.1.jar:?]
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294) ~[gson-2.10.1.jar:?]
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130) ~[gson-2.10.1.jar:?]
    at com.google.gson.Gson.getAdapter(Gson.java:556) ~[gson-2.10.1.jar:?]
    at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53) ~[gson-2.10.1.jar:?]
    at com.google.gson.Gson.getAdapter(Gson.java:556) ~[gson-2.10.1.jar:?]
    at com.google.gson.Gson.fromJson(Gson.java:1226) ~[gson-2.10.1.jar:?]
    at com.google.gson.Gson.fromJson(Gson.java:1329) ~[gson-2.10.1.jar:?]
    at com.google.gson.Gson.fromJson(Gson.java:1300) ~[gson-2.10.1.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.configuration.Configuration.onLoad(Configuration.java:81) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.configuration.Configuration.<init>(Configuration.java:59) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.configuration.Configuration.<init>(Configuration.java:48) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.configuration.Configuration.<clinit>(Configuration.java:43) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.ServersNPC.onDisable(ServersNPC.java:83) ~[znpcs-4.6.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:290) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:237) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugin(PaperPluginManagerImpl.java:114) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:549) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:206) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:519) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:604) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:553) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:675) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:437) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:323) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1136) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError [in thread "Server thread"]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.cache.CachePackage.<clinit>(CachePackage.java:7) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.cache.CacheRegistry.<clinit>(CacheRegistry.java:16) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.commands.Command.<clinit>(Command.java:31) ~[znpcs-4.6.jar:?]
    at znpcs-4.6.jar/io.github.gonalez.znpcs.ServersNPC.onEnable(ServersNPC.java:71) ~[znpcs-4.6.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.20.6.jar:1.20.6-112-347bbe3]
    ... 10 more
adydetra commented 1 month ago

Fixed in v4.8