PaperMC / Velocity

The modern, next-generation Minecraft server proxy.
https://papermc.io/software/velocity
GNU General Public License v3.0
1.77k stars 622 forks source link

NoSuchMethodError: BossBar.progress #401

Closed forresthopkinsa closed 3 years ago

forresthopkinsa commented 3 years ago

Initially reported in Discord.

While trying to use Adventure's bossbar component, I get a NoSuchMethodError on line 58 of this file.

Exception in thread "Velocity Task Scheduler - #0" java.lang.NoSuchMethodError: net.kyori.adventure.bossbar.BossBar.progress(F)Lnet/kyori/adventure/bossbar/BossBar;                                                                                                                                        
       at com.forresthopkinsa.nosolo.velocity.CountingTimer.update(CountingTimer.kt:58)                                                                                                                                                                                                                      
       at com.forresthopkinsa.nosolo.velocity.CountingTimer.access$update(CountingTimer.kt:10)                                                                                                                                                                                                               
       at com.forresthopkinsa.nosolo.velocity.CountingTimer$1.run(CountingTimer.kt:29)                                                                                                                                                                                                                       
       at com.velocitypowered.proxy.scheduler.VelocityScheduler$VelocityTask.lambda$run$0(VelocityScheduler.java:185)                                                                                                                                                                                        
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)                                                                                                                                                                                                                    
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)                                                                                                                                                                                                                    
       at java.lang.Thread.run(Thread.java:748)

Here is a dump of my Velocity configuration.

In summary:

Additionally, here's my build script. Maybe I misconfigured something in there?

Tux suggests that Kotlin is causing the problem, and insists that this is not a Velocity issue – so, I'm just gonna open this issue to track my progress on solving it for Kotlin users.

kashike commented 3 years ago

It sounds like you're developing against 1.1.3-SNAPSHOT but running on 1.1.2.

forresthopkinsa commented 3 years ago

I posted my build script above – it looks to me like I'm working with the 1.1.2 API

forresthopkinsa commented 3 years ago

I printed out my Gradle dependency tree, here it is

It suggests that Velocity is trying to pull in adventure-api:4.1.1 but is instead getting 4.3.0

Here's a snip of what looks to me like the culprit:

compileClasspath - Compile classpath for compilation 'main' (target  (jvm)).
...
\--- com.velocitypowered:velocity-api:1.1.2
     ...
     +--- net.kyori:adventure-text-serializer-legacy-text3:4.0.0-SNAPSHOT
     |    \--- net.kyori:adventure-api:4.3.0 (*)
     ...
zml2008 commented 3 years ago

Ah yes that makes sense -- that serializer is part of the platform project, so it keeps getting updated. I expect velocity will have to exclude its transitive dependency on newer adventure.

forresthopkinsa commented 3 years ago

As a temporary workaround, @zml2008's suggestion to use BossBar.percent(float) suffices. Thanks for the tip!

forresthopkinsa commented 3 years ago

@astei Thanks! 🎉 What's the ETA for the next release looking like?

astei commented 3 years ago

It will come out when it comes out. I do not give ETAs, I work on this in my free time and when contracted to work on it.

forresthopkinsa commented 3 years ago

I'm just not familiar with the Velocity release cadence