DiscordSRV

DiscordSRV

86.8k Downloads

World with announceadvancements gamerule disabled reports console with an error

DerpDerpling opened this issue ยท 1 comments

commented

Expected behavior

No errors to show up in console when announce advancements is disabled

Actual behavior

it puts this error in console

[15:04:18 ERROR]: Could not pass event PlayerAdvancementDoneEvent to DiscordSRV v1.24.1-SNAPSHOT java.lang.ClassCastException: class java.lang.reflect.Method cannot be cast to class org.bukkit.GameRule (java.lang.reflect.Method is in module java.base of loader 'bootstrap'; org.bukkit.GameRule is in unnamed module of loader 'app') at github.scarsz.discordsrv.listeners.PlayerAdvancementDoneListener.onPlayerAdvancementDone(PlayerAdvancementDoneListener.java:84) ~[DiscordSRV-Build-1.24.1-SNAPSHOT-de20b10.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor436.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.17.1.jar:git-Purpur-1427] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.17.1.jar:git-Purpur-1427] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.17.1.jar:git-Purpur-1427] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[patched_1.17.1.jar:git-Purpur-1427] at net.minecraft.server.PlayerAdvancements.award(PlayerAdvancements.java:298) ~[app:?] at net.minecraft.advancements.CriterionTrigger$Listener.run(CriterionTrigger.java:35) ~[app:?] at net.minecraft.advancements.critereon.SimpleCriterionTrigger.trigger(SimpleCriterionTrigger.java:73) ~[app:?] at net.minecraft.advancements.critereon.InventoryChangeTrigger.lambda$trigger$0(InventoryChangeTrigger.java:55) ~[app:?] at net.minecraft.advancements.critereon.InventoryChangeTrigger.trigger(InventoryChangeTrigger.java:51) ~[app:?] at net.minecraft.server.level.ServerPlayer$2.slotChanged(ServerPlayer.java:316) ~[app:?] at net.minecraft.world.inventory.AbstractContainerMenu.triggerSlotListeners(AbstractContainerMenu.java:297) ~[app:?] at net.minecraft.world.inventory.AbstractContainerMenu.broadcastChanges(AbstractContainerMenu.java:234) ~[app:?] at net.minecraft.world.inventory.AbstractContainerMenu.addSlotListener(AbstractContainerMenu.java:168) ~[app:?] at net.minecraft.server.level.ServerPlayer.initMenu(ServerPlayer.java:601) ~[app:?] at net.minecraft.server.level.ServerPlayer.initInventoryMenu(ServerPlayer.java:606) ~[app:?] at net.minecraft.server.players.PlayerList.onPlayerJoinFinish(PlayerList.java:477) ~[patched_1.17.1.jar:git-Purpur-1427] at net.minecraft.server.players.PlayerList.postChunkLoadJoin(PlayerList.java:421) ~[patched_1.17.1.jar:git-Purpur-1427] at net.minecraft.server.players.PlayerList.lambda$placeNewPlayer$1(PlayerList.java:302) ~[patched_1.17.1.jar:git-Purpur-1427] at net.minecraft.server.network.ServerGamePacketListenerImpl.tick(ServerGamePacketListenerImpl.java:322) ~[app:?] at net.minecraft.network.Connection.tick(Connection.java:555) ~[app:?] at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:201) ~[app:?] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1679) ~[patched_1.17.1.jar:git-Purpur-1427] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:528) ~[patched_1.17.1.jar:git-Purpur-1427] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1505) ~[patched_1.17.1.jar:git-Purpur-1427] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1298) ~[patched_1.17.1.jar:git-Purpur-1427] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:322) ~[patched_1.17.1.jar:git-Purpur-1427] at java.lang.Thread.run(Thread.java:831) ~[?:?]

Steps to reproduce

use the latest discordsrv snapshot, load into a world with announceadvancements off, get an advancement, observe error in console.

Server software and version

git-Purpur-1427 (MC: 1.17.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

No response

commented

Fixed on latest snapshot, https://snapshot.discordsrv.com