dmulloy2 / ProtocolLib

Provides read and write access to the Minecraft protocol with Bukkit.
GNU General Public License v2.0
1.03k stars 258 forks source link

Cannot invoke "java.lang.Class.getEnumConstantsShared()" because "klass" is null #2971

Open bridgelol opened 4 months ago

bridgelol commented 4 months ago

Implementation:

Writing to AbstractStructure#getPlayerInfoActions() throws this the first time around for some reason, only does it one-off

5.2.0-SNAPSHOT-679

bridgelol commented 4 months ago

Issue was also reported here: #2061

dmulloy2 commented 4 months ago

does this just happen the first time, or is it seemingly random? would be good to understand specifically how it happens to better fix it

bridgelol commented 4 months ago

does this just happen the first time, or is it seemingly random? would be good to understand specifically how it happens to better fix it

First time only

dmulloy2 commented 4 months ago

which version are you using?

bridgelol commented 4 months ago

which version are you using?

5.2.0-SNAPSHOT-679

dmulloy2 commented 3 months ago

@bridgelol does this still happen on the latest dev build?

bridgelol commented 3 months ago

@bridgelol does this still happen on the latest dev build?

Seems fine but breaks scoreboard team packet functionality (unless I'm unaware of it changing).

FieldAccessExceptionnetherite Field index 0 is out of bounds for length 0

at com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49) at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:318) at gg.netherite.plugin.paper.protocol.wrapper.PacketWrapperScoreboardTeam$Update.build(PacketWrapperScoreboardTeam.kt:65) at gg.netherite.plugin.paper.protocol.wrapper.PacketWrapperScoreboardTeam$Create.build(PacketWrapperScoreboardTeam.kt:43) at gg.netherite.plugin.paper.protocol.ExtensionKt.sendPacketWrapper(extension.kt:40) at gg.netherite.plugin.paper.nametag.NametagManager$setup$1$1.invokeSuspend(NametagManager.kt:94) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.lang.Thread.run(Thread.java:1583)

This is on a 1.20.4 paper server

bridgelol commented 3 months ago

Any update on this @dmulloy2?