1.20.6 Paper - Failed to find NMS class: world.entity.player.EnumChatVisibility
LoneDev6 opened this issue ยท 1 comments
[15:38:35 INFO]: This server is running Paper version git-Paper-49 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: ac3a547)
You are 2 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: git-Paper-32 (MC: 1.20.6)
> version ProtocolLib
[15:38:37 INFO]: ProtocolLib version 5.2.1-SNAPSHOT-689
[15:38:37 INFO]: Provides read/write access to the Minecraft protocol.
[15:38:37 INFO]: Authors: dmulloy2 and comphenix
This code worked fine on 1.20.4 and older.
My code:
packet.getChatTypes().read(0) == EnumWrappers.ChatType.GAME_INFO
Error:
[15:36:46 ERROR]: [ItemsAdder] Unhandled exception occurred in onPacketSending(PacketEvent) for ItemsAdder
java.lang.RuntimeException: Failed to find NMS class: world.entity.player.EnumChatVisibility
at ProtocolLib.jar/com.comphenix.protocol.utility.MinecraftReflection.lambda$getMinecraftClass$2(MinecraftReflection.java:1386) ~[ProtocolLib.jar:?]
at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
at ProtocolLib.jar/com.comphenix.protocol.utility.MinecraftReflection.getMinecraftClass(MinecraftReflection.java:1386) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.wrappers.EnumWrappers.initialize(EnumWrappers.java:503) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.wrappers.EnumWrappers.getChatTypeClass(EnumWrappers.java:730) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.events.AbstractStructure.getChatTypes(AbstractStructure.java:856) ~[ProtocolLib.jar:?]
at ItemsAdder.jar/dev.lone.itemsadder.chat.ChatPacketsHandler$3.onPacketSending(ChatPacketsHandler.java:148) ~[ItemsAdder.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:219) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.SortedPacketListenerList.invokeUnpackedPacketSending(SortedPacketListenerList.java:204) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:139) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:553) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:526) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketSending(NetworkManagerInjector.java:100) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:563) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyChannelInjector$2.doProxyRunnable(NettyChannelInjector.java:466) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.proxyRunnable(NettyEventLoopProxy.java:43) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:252) ~[ProtocolLib.jar:?]
at net.minecraft.network.Connection.sendPacket(Connection.java:488) ~[paper-1.20.6.jar:git-Paper-49]
at net.minecraft.network.Connection.send(Connection.java:448) ~[paper-1.20.6.jar:git-Paper-49]
at net.minecraft.server.network.ServerCommonPacketListenerImpl.send(ServerCommonPacketListenerImpl.java:311) ~[paper-1.20.6.jar:git-Paper-49]
at net.minecraft.server.network.ServerCommonPacketListenerImpl.send(ServerCommonPacketListenerImpl.java:292) ~[paper-1.20.6.jar:git-Paper-49]
at ProtocolLib.jar/com.comphenix.protocol.reflect.accessors.DefaultMethodAccessor.invoke(DefaultMethodAccessor.java:23) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.sendServerPacket(NettyChannelInjector.java:295) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.lambda$processOutbound$6(NettyChannelInjector.java:557) ~[ProtocolLib.jar:?]
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.6.jar:git-Paper-49]
at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482) ~[paper-1.20.6.jar:git-Paper-49]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1703) ~[paper-1.20.6.jar:git-Paper-49]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:468) ~[paper-1.20.6.jar:git-Paper-49]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1575) ~[paper-1.20.6.jar:git-Paper-49]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1235) ~[paper-1.20.6.jar:git-Paper-49]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:326) ~[paper-1.20.6.jar:git-Paper-49]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[15:36:46 ERROR]: Parameters:
net.minecraft.network.protocol.game.ClientboundPlayerChatPacket@2f1c04b8[
sender=68bbf558-ed0e-37ab-bb3e-9c8672097642
index=0
signature=<null>
body=Packed[content=a, timeStamp=2024-05-07T13:36:46.410675400Z, salt=0, lastSeen=Packed[entries=[]]]
unsignedContent=<null>
filterMask=net.minecraft.network.chat.FilterMask@43b2efad
chatType=Bound[chatType=Reference{ResourceKey[minecraft:chat_type / minecraft:chat]=ChatType[chat=ChatTypeDecoration[translationKey=chat.type.text, parameters=[SENDER, CONTENT], style={}], narration=ChatTypeDecoration[translationKey=chat.type.text.narrate, parameters=[SENDER, CONTENT], style={}]]}, name=io.papermc.paper.adventure.AdventureComponent@f0d5f7c, targetName=Optional.empty]
]
>
Yes, same here...
I mentioned this here, too: #2669 (comment)
EnumChatVisibility must be ChatVisibility in Paper (without obfuscation)!