Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Protocollib error #400

Open
Castiella opened this issue Jun 18, 2024 · 2 comments
Open

[BUG] Protocollib error #400

Castiella opened this issue Jun 18, 2024 · 2 comments

Comments

@Castiella
Copy link

[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor.set(DefaultFieldAccessor.java:44)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:361)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:324)
[19:02:33 WARN]:        at oraxen-1.176.0 (1).jar//io.th0rgal.oraxen.font.packets.ScoreboardPacketListener.onPacketSending(ScoreboardPacketListener.java:22)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.collection.OutboundPacketListenerSet.invokeListener(OutboundPacketListenerSet.java:74)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.collection.PacketListenerSet.lambda$invoke$0(PacketListenerSet.java:120)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.timing.TimingTracker.lambda$static$0(TimingTracker.java:7)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.collection.PacketListenerSet.invoke(PacketListenerSet.java:120)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.collection.OutboundPacketListenerSet.invoke(OutboundPacketListenerSet.java:30)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.collection.PacketListenerSet.invoke(PacketListenerSet.java:99)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:556)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:530)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketSending(NetworkManagerInjector.java:85)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:612)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.netty.channel.NettyChannelInjector$2.doProxyRunnable(NettyChannelInjector.java:501)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.proxyRunnable(NettyEventLoopProxy.java:43)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:252)
[19:02:33 WARN]:        at net.minecraft.network.NetworkManager.b(NetworkManager.java:433)
[19:02:33 WARN]:        at net.minecraft.network.NetworkManager.a(NetworkManager.java:393)
[19:02:33 WARN]:        at net.minecraft.server.network.ServerCommonPacketListenerImpl.a(ServerCommonPacketListenerImpl.java:255)
[19:02:33 WARN]:        at net.minecraft.server.network.ServerCommonPacketListenerImpl.b(ServerCommonPacketListenerImpl.java:240)
[19:02:33 WARN]:        at net.minecraft.server.players.PlayerList.a(PlayerList.java:517)
[19:02:33 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.scoreboard.CraftScoreboardManager.setPlayerBoard(CraftScoreboardManager.java:106)
[19:02:33 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer.setScoreboard(CraftPlayer.java:2691)
[19:02:33 WARN]:        at Minigames-1.20-SNAPSHOT.jar//au.com.mineauz.minigames.managers.MinigamePlayerManager.joinMinigame(MinigamePlayerManager.java:148)
[19:02:33 WARN]:        at Minigames-1.20-SNAPSHOT.jar//au.com.mineauz.minigames.signs.JoinSign.signUse(JoinSign.java:109)
[19:02:33 WARN]:        at Minigames-1.20-SNAPSHOT.jar//au.com.mineauz.minigames.signs.SignBase.signUse(SignBase.java:118)
[19:02:33 WARN]:        at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40)
[19:02:33 WARN]:        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81)
[19:02:33 WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[19:02:33 WARN]:        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
[19:02:33 WARN]:        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126)
[19:02:33 WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615)
[19:02:33 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:594)
[19:02:33 WARN]:        at net.minecraft.server.level.PlayerInteractManager.a(PlayerInteractManager.java:536)
[19:02:33 WARN]:        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1935)
[19:02:33 WARN]:        at net.minecraft.network.protocol.game.PacketPlayInUseItem.a(PacketPlayInUseItem.java:37)
[19:02:33 WARN]:        at net.minecraft.network.protocol.game.PacketPlayInUseItem.a(PacketPlayInUseItem.java:9)
[19:02:33 WARN]:        at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$0(PlayerConnectionUtils.java:54)
[19:02:33 WARN]:        at net.minecraft.server.TickTask.run(TickTask.java:18)
[19:02:33 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:149)
[19:02:33 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[19:02:33 WARN]:        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1465)
[19:02:33 WARN]:        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194)
[19:02:33 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:123)
[19:02:33 WARN]:        at net.minecraft.server.MinecraftServer.bl(MinecraftServer.java:1442)
[19:02:33 WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1365)
[19:02:33 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:133)
[19:02:33 WARN]:        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1516)
[19:02:33 WARN]:        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1226)
[19:02:33 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[19:02:33 WARN]:        at java.base/java.lang.Thread.run(Thread.java:840)
[19:02:33 WARN]: Caused by: java.lang.ClassCastException: Cannot cast io.papermc.paper.scoreboard.numbers.BlankFormatImpl to net.minecraft.network.chat.numbers.NumberFormat
[19:02:33 WARN]:        at java.base/java.lang.Class.cast(Class.java:3890)
[19:02:33 WARN]:        at ProtocolLib (3).jar//com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor.set(DefaultFieldAccessor.java:41)
[19:02:33 WARN]:        ... 51 more```

**To Reproduce**
Play a minigame. 


**Server (please complete the following information):**
  - Minigames Version:  Version: 1.20-SNAPSHOT-360
  - Server Type: paper
  - Server Version:[19:07:27 INFO]: This server is running Paper version git-Paper-497 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: d8d54d9 on ver/1.20.4)
@addstar
Copy link
Member

addstar commented Jun 21, 2024

Hello @Castiella
It looks like the first part of the exception has been cut off, can you provide the full output and describe a bit more about when this happens? Also it looks like ProtocolLib and oraxen is involved somehow, can you provide exact versions of both those plugins?

Can you also let me know what kind of minigame you are trying and if this was previously working or if this is a new install?

@FireInstall
Copy link
Contributor

FireInstall commented Jul 7, 2024

What oraxen does is just wrong. The paper impementation of blank number format does NOT extend the nms one (as one would expect) and therefore should NOT be used in packets.
The problem should not just happen with Minigames but with almost every other plugin using Scoreboards.

They should eighter make use of io.papermc.paper.util.PaperScoreboardFormatasVanilla(io.papermc.paper.scoreboard.numbers.NumberFormat) or directly use net.minecraft.network.chat.numbers.BlankFormat.INSTANCE - even though messing with scoreboards of other plugins is just bad luck and most likely will break something anyways. Like in cases where we would like to display a minigame score as we do when you join a minigame - that's why we create our scoreboard at this point!

I would highly recommend everyone to turn the config option of hiding the scoreboard numbers of.

If you want a nicer Minigames Scoreboard, that's something I have on my todo-list, but you should create a new feature request issue anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants