Unable to construct PacketPlayOutScoreboardObjective
FabianKoder opened this issue ยท 0 comments
- This issue is not solved in a development build
Describe the bug
When I try to construct the PacketType.Play.Server.SCOREBOARD_OBJECTIVE
packet (e.g. new PacketContainer(PacketType.Play.Server.SCOREBOARD_OBJECTIVE)
) an exception will occur. This is seems to occur at random - after restarting the server sometimes it just works again, sometimes several restarts are required.
See the following log for the stack trace:
java.lang.NullPointerException: Unable to create packet instance for class class net.minecraft.network.protocol.game.PacketPlayOutScoreboardObjective
at java.util.Objects.requireNonNull(Objects.java:233) ~[?:?]
at com.comphenix.protocol.injector.StructureCache.lambda$newPacket$2(StructureCache.java:97) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.StructureCache.newPacket(StructureCache.java:101) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.StructureCache.newPacket(StructureCache.java:111) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.events.PacketContainer.<init>(PacketContainer.java:117) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.PacketFilterManager.createPacket(PacketFilterManager.java:384) ~[ProtocolLib.jar:?]
...
I use Java 18, newest Paper build 1.19.3 (420) and the newest ProtocolLib build (614).
To Reproduce
Create a SCOREBOARD_OBJECTIVE packet on player join. Doesn't need to be sent, just constructed.
Expected behavior
Being able to construct the packet
Screenshots
-
Version Info
https://pastebin.com/Ep4BhpMQ
Additional context
As far as I could debug the issue, it tries finding the minimal constructor, finds this:
public PacketPlayOutScoreboardObjective(ScoreboardObjective scoreboardobjective, int i) {
this.objectiveName = scoreboardobjective.getName();
this.displayName = scoreboardobjective.getDisplayName();
this.renderType = scoreboardobjective.getRenderType();
this.method = i;
}
and will fail of course.