juliarn / npc-lib

Asynchronous, high-performance Minecraft NPC library for 1.8-1.21 servers.
MIT License
296 stars 50 forks source link

Error when the player join this server #72

Closed darksider1010 closed 1 year ago

darksider1010 commented 2 years ago

Hey, after restarting the server and the player join this server comes following error.

IMPORTANT: The player must be in the near from npc. So that the npc show directly in the tab.

This only happens with a restart My currently Protocollib version is: 4.7.0. https://ci.dmulloy2.net/job/ProtocolLib/533/ The currently server version is: git-PaperSpigot-445 (MC: 1.8.8)

java.lang.NoSuchMethodException: java.util.Collections$SingletonList.<init>()
[21:26:21 WARN]:       at java.lang.Class.getConstructor0(Class.java:3082)
[21:26:21 WARN]:       at java.lang.Class.getConstructor(Class.java:1825)
[21:26:21 WARN]:       at com.comphenix.protocol.wrappers.BukkitConverters.getGenericList(BukkitConverters.java:277)
[21:26:21 WARN]:       at com.comphenix.protocol.wrappers.BukkitConverters.access$100(BukkitConverters.java:88)
[21:26:21 WARN]:       at com.comphenix.protocol.wrappers.BukkitConverters$3.getGeneric(BukkitConverters.java:367)
[21:26:21 WARN]:       at com.comphenix.protocol.wrappers.BukkitConverters$3.getGeneric(BukkitConverters.java:359)
[21:26:21 WARN]:       at com.comphenix.protocol.wrappers.Converters$1.getGeneric(Converters.java:48)
[21:26:21 WARN]:       at com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:372)
[21:26:21 WARN]:       at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:345)
[21:26:21 WARN]:       at com.github.juliarn.npc.modifier.VisibilityModifier.queuePlayerListChange(VisibilityModifier.java:60)
[21:26:21 WARN]:       at com.github.juliarn.npc.NPC.show(NPC.java:86)
[21:26:21 WARN]:       at com.github.juliarn.npc.NPCPool.lambda$npcTick$1(NPCPool.java:173)
[21:26:21 WARN]:       at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
[21:26:21 WARN]:       at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[21:26:21 WARN]:       at org.github.paperspigot.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:23)
[21:26:21 WARN]:       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[21:26:21 WARN]:       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[21:26:21 WARN]:       at java.lang.Thread.run(Thread.java:748)
[21:26:21 WARN]: java.lang.NoSuchMethodException: java.util.Collections$SingletonList.<init>()
[21:26:21 WARN]:       at java.lang.Class.getConstructor0(Class.java:3082)
[21:26:21 WARN]:       at java.lang.Class.getConstructor(Class.java:1825)
[21:26:21 WARN]:       at com.comphenix.protocol.wrappers.BukkitConverters.getGenericList(BukkitConverters.java:277)
[21:26:21 WARN]:       at com.comphenix.protocol.wrappers.BukkitConverters.access$100(BukkitConverters.java:88)
[21:26:21 WARN]:       at com.comphenix.protocol.wrappers.BukkitConverters$3.getGeneric(BukkitConverters.java:367)
[21:26:21 WARN]:       at com.comphenix.protocol.wrappers.BukkitConverters$3.getGeneric(BukkitConverters.java:359)
[21:26:21 WARN]:       at com.comphenix.protocol.wrappers.Converters$1.getGeneric(Converters.java:48)
[21:26:21 WARN]:       at com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:372)
[21:26:21 WARN]:       at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:345)
[21:26:21 ERROR]: java.lang.NullPointerException
[21:26:21 WARN]:       at com.github.juliarn.npc.modifier.VisibilityModifier.queuePlayerListChange(VisibilityModifier.java:60)
[21:26:21 WARN]:       at com.github.juliarn.npc.NPC.show(NPC.java:86)
[21:26:21 WARN]:       at com.github.juliarn.npc.NPCPool.lambda$npcTick$1(NPCPool.java:173)
[21:26:21 WARN]:       at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
[21:26:21 WARN]:       at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[21:26:21 WARN]:       at org.github.paperspigot.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:23)
[21:26:21 WARN]:       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[21:26:21 WARN]:       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[21:26:21 WARN]:       at java.lang.Thread.run(Thread.java:748
juliarn commented 2 years ago

As stated on the site, you should use at least ProtocolLib 4.8.0 (https://ci.dmulloy2.net/job/ProtocolLib/547/), the issue should be fixed then.

derklaro commented 1 year ago

Closing due to inactivity.