MegavexNetwork / scoreboard-library

Powerful packet-level scoreboard library for Paper/Spigot servers
https://megavex.net
MIT License
150 stars 13 forks source link

Boken on 1.20.1 #8

Closed nicolube closed 1 year ago

nicolube commented 1 year ago

Hey,

RC14 seems to be broken on 1.20.1:

Server-Version: git-Purpur-2062 (MC: 1.20.1)*

java.util.concurrent.CompletionException: java.lang.NoSuchMethodError: 'java.util.Collection net.minecraft.network.protocol.game.PacketPlayOutScoreboardTeam.f()'
    at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
    at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
    at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649) ~[?:?]
    at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773) ~[?:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
    at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
    at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
Caused by: java.lang.NoSuchMethodError: 'java.util.Collection net.minecraft.network.protocol.game.PacketPlayOutScoreboardTeam.f()'
    at net.megavex.scoreboardlibrary.implementation.packetAdapter.modern.team.AbstractTeamsPacketAdapterImpl$TeamDisplayPacketAdapterImpl.fillTeamPacket(AbstractTeamsPacketAdapterImpl.java:67) ~[PrimeCorePlugin-0.1.1-SNAPSHOT.jar:?]
    at net.megavex.scoreboardlibrary.implementation.packetAdapter.modern.team.PaperTeamsPacketAdapterImpl$TeamDisplayPacketAdapterImpl.updateTeamPackets(PaperTeamsPacketAdapterImpl.java:39) ~[PrimeCorePlugin-0.1.1-SNAPSHOT.jar:?]
    at net.megavex.scoreboardlibrary.implementation.team.TeamDisplayImpl.updateTeamPackets(TeamDisplayImpl.java:209) ~[PrimeCorePlugin-0.1.1-SNAPSHOT.jar:?]
    at net.megavex.scoreboardlibrary.implementation.team.TeamDisplayImpl.<init>(TeamDisplayImpl.java:37) ~[PrimeCorePlugin-0.1.1-SNAPSHOT.jar:?]
    at net.megavex.scoreboardlibrary.implementation.team.ScoreboardTeamImpl.<init>(ScoreboardTeamImpl.java:25) ~[PrimeCorePlugin-0.1.1-SNAPSHOT.jar:?]
    at net.megavex.scoreboardlibrary.implementation.team.TeamManagerImpl.createIfAbsent(TeamManagerImpl.java:77) ~[PrimeCorePlugin-0.1.1-SNAPSHOT.jar:?]
    at net.megavex.scoreboardlibrary.api.team.TeamManager.createIfAbsent(TeamManager.java:50) ~[PrimeCorePlugin-0.1.1-SNAPSHOT.jar:?]
    at de.primecodes.core.bukkit.listener.TabListListener.lambda$create$6(TabListListener.java:173) ~[PrimeCorePlugin-0.1.1-SNAPSHOT.jar:?]
    at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
    ... 8 more
vytskalt commented 1 year ago

I'll take a look at it later today

vytskalt commented 1 year ago

I cannot reproduce this on Paper and Purpur 1.20.1. Are you using a mojang mapped server jar? If not, could you write a minimal example that produces that exception? @nicolube

nicolube commented 1 year ago

As initaly stated, I'm using: git-Purpur-2062 (MC: 1.20.1)*

Also RC-12 Works just fine. I haven't tryed RC-13. But RC-14 does not work on Purpur

vytskalt commented 1 year ago

As initaly stated, I'm using: git-Purpur-2062 (MC: 1.20.1)*

Also RC-12 Works just fine. I haven't tryed RC-13. But RC-14 does not work on Purpur

I've tried that exact build and it worked for me

nicolube commented 1 year ago

Ok, then I try to reproduce it tomorrow with a min plugin, we have it in a ratar large project.

nicolube commented 1 year ago

Ahh, I think i found the issue, I still hat the API as RC10 included in a parent module, my bad.

nicolube commented 1 year ago

Ok, the issue still persits, here is a Demo Plugin: https://github.com/nicolube/ScoreboardLibaryDemo

I tryed it on Linux Debian 11 / Linux Manjaro (OpenJDK 17). Still throws the Stcktrace. See setup.sh for Server source.

vytskalt commented 1 year ago

Thanks for the demo, I was able to reproduce it. Should be fixed in the main branch, try setting the version to f5ff418eff. The main branch also has some significant internal changes so if you're having any other issues let me know, otherwise I'll make a new release

nicolube commented 1 year ago

I put it into the main projects and put it on dev and it looks normal.

It may be a good idea to make an Intigration Test Container that tests all MC versions.