DiscordSRV

DiscordSRV

86.8k Downloads

(CraftAdvancement) - DiscordSRV Compatibility Issue with Minecraft 1.8.8

FabioV0 opened this issue ยท 3 comments

commented

Expected behavior

The plugin should not attempt to use classes or methods that do not exist in the Minecraft 1.8.8 API, allowing DiscordSRV to function normally without triggering errors related to advancements.

Actual behavior

When players join the server, DiscordSRV tries to access the CraftAdvancement class, resulting in a ClassNotFoundException and generating warnings in the server log.

Steps to reproduce

  1. Use Minecraft version 1.8.8 with DiscordSRV installed.

  2. Observe the server log when players join the server.

  3. Notice the error related to CraftAdvancement.

Server software and version

git-Paper-110 (MC: 1.8.8)

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.

Ticket number or message link to where you asked in DiscordSRV's Discord server about this

19693

Anything else

[00:38:56 WARN]: java.lang.ClassNotFoundException: Could not find org.bukkit.craftbukkit.advancement.CraftAdvancement
[00:38:56 WARN]: at github.scarsz.discordsrv.util.NMSUtil.fixBukkitClass(NMSUtil.java:130)
[00:38:56 WARN]: at github.scarsz.discordsrv.util.NMSUtil.(NMSUtil.java:78)
[00:38:56 WARN]: at github.scarsz.discordsrv.DiscordSRV.getAvatarUrl(DiscordSRV.java:2065)
[00:38:56 WARN]: at github.scarsz.discordsrv.DiscordSRV.sendJoinMessage(DiscordSRV.java:1910)
[00:38:56 WARN]: at github.scarsz.discordsrv.listeners.PlayerJoinLeaveListener.lambda$onPlayerJoin$1(PlayerJoinLeaveListener.java:94)
[00:38:56 WARN]: at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71)
[00:38:56 WARN]: at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[00:38:56 WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[00:38:56 WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[00:38:56 WARN]: at java.lang.Thread.run(Thread.java:748)

commented

Confirmed on 1.29.0

[13:32:55 WARN]: java.lang.ClassNotFoundException: Could not find org.bukkit.craftbukkit.advancement.CraftAdvancement
[13:32:55 WARN]: 	at github.scarsz.discordsrv.util.NMSUtil.fixBukkitClass(NMSUtil.java:130)
[13:32:55 WARN]: 	at github.scarsz.discordsrv.util.NMSUtil.<clinit>(NMSUtil.java:78)
[13:32:55 WARN]: 	at github.scarsz.discordsrv.DiscordSRV.getAvatarUrl(DiscordSRV.java:2089)
[13:32:55 WARN]: 	at github.scarsz.discordsrv.listeners.PlayerAchievementsListener.runAsync(PlayerAchievementsListener.java:120)
[13:32:55 WARN]: 	at github.scarsz.discordsrv.listeners.PlayerAchievementsListener.lambda$onPlayerAchievementAwarded$0(PlayerAchievementsListener.java:86)
[13:32:55 WARN]: 	at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
[13:32:55 WARN]: 	at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[13:32:55 WARN]: 	at org.github.paperspigot.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:23)
[13:32:55 WARN]: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[13:32:55 WARN]: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[13:32:55 WARN]: 	at java.lang.Thread.run(Thread.java:750)
commented

Solved in #1783

commented

Fixed in the latest snapshot builds: https://snapshot.discordsrv.com/