LOOHP / InteractiveChat

Add click and hover events to chat messages!
https://www.spigotmc.org/resources/75870/
GNU General Public License v3.0
150 stars 27 forks source link

Error class not found in Velocity #124

Closed awang-karisma closed 1 year ago

awang-karisma commented 1 year ago

Hello, starting from build #187, Velocity moved their LegacyChat from com/velocitypowered/proxy/protocol/packet/chat/LegacyChat.java to com/velocitypowered/proxy/protocol/packet/chat/legacy/LegacyChat.java

https://github.com/PaperMC/Velocity/commit/b504e0857c02217e89ed47a35aa76af1f00d3a48#diff-144d242824a31692af5e8b4f8714bc88721fb607de5dd856c420c2af8fb3335a

this caused error that spams log (might affect performance)


[20:27:16] [Netty epoll Worker #4/ERROR]: java.lang.NoClassDefFoundError: com/velocitypowered/proxy/protocol/packet/chat/LegacyChat
[20:27:16] [Netty epoll Worker #4/ERROR]:   at com.loohp.interactivechat.proxy.velocity.InteractiveChatVelocity$2.write(InteractiveChatVelocity.java:843)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:966)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:934)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at com.velocitypowered.proxy.connection.MinecraftConnection.write(MinecraftConnection.java:218)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler.activated(ClientPlaySessionHandler.java:155)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at com.velocitypowered.proxy.connection.MinecraftConnection.setSessionHandler(MinecraftConnection.java:392)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at com.velocitypowered.proxy.connection.backend.TransitionSessionHandler.lambda$handle$0(TransitionSessionHandler.java:124)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at java.base/java.lang.Thread.run(Thread.java:833)
[20:27:16] [Netty epoll Worker #4/ERROR]: Caused by: java.lang.ClassNotFoundException: com.velocitypowered.proxy.protocol.packet.chat.LegacyChat
[20:27:16] [Netty epoll Worker #4/ERROR]:   at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass0(PluginClassLoader.java:84)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass(PluginClassLoader.java:61)
[20:27:16] [Netty epoll Worker #4/ERROR]:   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
[20:27:16] [Netty epoll Worker #4/ERROR]:   ... 26 more```
LOOHP commented 1 year ago

Problems regarding the new 1.19.3 velocity builds will be solved along with the main 1.19.3 InteractiveChat release, thank you!

awang-karisma commented 1 year ago

Wow that was quick, thanks for the heads up! Really appreciate the hard work!

LOOHP commented 1 year ago

No problem! Update is out now.

awang-karisma commented 1 year ago

Hello, I updated to InteractiveChat-4.2.4.0 but still getting the same error in Velocity, probably you forgot to update the class name?

Edit: Nevermind, my bad. I was using the old Velocity version before the class change, so I could keep using InteractiveChat. Updated Velocity to snapshot 200 and it works. Thanks!