DiscordSRV

DiscordSRV

86.8k Downloads

Doesn't load on latest Paper

Electronik21 opened this issue ยท 2 comments

commented

Expected behavior

For the plugin to load and work

Actual behavior

The plugin doesn't load and fails with java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException. I think it's caused by this paper commit which added a couple patches from Folia

Steps to reproduce

  1. Install any paper 1.20.1 build # 42 or later
  2. Install latest discordsrv
  3. Start the server

Server software and version

git-Paper-43 (MC: 1.20.1)

Checks

  • I am not using an outdated version of DiscordSRV.
  • I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.

Anything else

Log:

[03:14:23 PM ERROR]: [DiscordSRV] java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
[03:14:23 PM ERROR]: [DiscordSRV]       at discordsrv.jar//github.scarsz.discordsrv.util.SchedulerUtil.callMethod(SchedulerUtil.java:40)
[03:14:23 PM ERROR]: [DiscordSRV]       at discordsrv.jar//github.scarsz.discordsrv.util.SchedulerUtil.callMethod(SchedulerUtil.java:45)
[03:14:23 PM ERROR]: [DiscordSRV]       at discordsrv.jar//github.scarsz.discordsrv.util.SchedulerUtil.runTaskLater(SchedulerUtil.java:115)
[03:14:23 PM ERROR]: [DiscordSRV]       at discordsrv.jar//github.scarsz.discordsrv.modules.voice.VoiceModule.<init>(VoiceModule.java:79)
[03:14:23 PM ERROR]: [DiscordSRV]       at discordsrv.jar//github.scarsz.discordsrv.DiscordSRV.init(DiscordSRV.java:1325)
[03:14:23 PM ERROR]: [DiscordSRV]       at java.base/java.lang.Thread.run(Thread.java:1623)
[03:14:23 PM ERROR]: [DiscordSRV] Caused by: java.lang.reflect.InvocationTargetException
[03:14:23 PM ERROR]: [DiscordSRV]       at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
[03:14:23 PM ERROR]: [DiscordSRV]       at java.base/java.lang.reflect.Method.invoke(Method.java:578)
[03:14:23 PM ERROR]: [DiscordSRV]       at discordsrv.jar//github.scarsz.discordsrv.util.SchedulerUtil.callMethod(SchedulerUtil.java:38)
[03:14:23 PM ERROR]: [DiscordSRV]       ... 5 more
[03:14:23 PM ERROR]: [DiscordSRV] Caused by: java.lang.IllegalArgumentException: Delay ticks may not be <= 0
[03:14:23 PM ERROR]: [DiscordSRV]       at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler.runDelayed(FoliaGlobalRegionScheduler.java:61)
[03:14:23 PM ERROR]: [DiscordSRV]       at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[03:14:23 PM INFO]: [DiscordSRV] Disabling DiscordSRV v1.26.3-SNAPSHOT
commented

Above commit likely fixes the issue (https://snapshot.discordsrv.com for a dev build), might still need to add a check so the Folia scheduler only gets used on Folia now that the Folia scheduler api is included in Paper...

commented

That commit fixed it. Thank you