toxicity188 / BetterHud

A multi-platform server-side implementation of HUD in Minecraft, supporting Bukkit(with Folia), Velocity, and Fabric.
https://modrinth.com/mod/betterhud2
MIT License
115 stars 27 forks source link

Huds and Commands in 1.18.2 seems not to work. #43

Closed Doren12345 closed 1 month ago

Doren12345 commented 1 month ago

image When I joined the server, I couldn't see any of the boss bars (HUDs), and the following error occurred:

[20:43:31] [Server thread/ERROR]: Could not pass event PlayerJoinEvent to BetterHud v1.4-HOTFIX
java.util.concurrent.CompletionException: java.lang.ClassCastException: class kr.toxicity.hud.bootstrap.bukkit.player.HudPlayerBukkit cannot be cast to class org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer (kr.toxicity.hud.bootstrap.bukkit.player.HudPlayerBukkit is in unnamed module of loader 'BetterHud-1.4-HOTFIX.jar' @656d8396; org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer is in unnamed module of loader java.net.URLClassLoader @504bae78)
    at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
    at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?]
    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.ClassCastException: class kr.toxicity.hud.bootstrap.bukkit.player.HudPlayerBukkit cannot be cast to class org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer (kr.toxicity.hud.bootstrap.bukkit.player.HudPlayerBukkit is in unnamed module of loader 'BetterHud-1.4-HOTFIX.jar' @656d8396; org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer is in unnamed module of loader java.net.URLClassLoader @504bae78)
    at kr.toxicity.hud.nms.v1_18_R2.NMSImpl.inject(NMSImpl.kt:85) ~[BetterHud-1.4-HOTFIX.jar:?]
    at kr.toxicity.hud.player.HudPlayerImpl.inject(HudPlayerImpl.kt:40) ~[BetterHud-1.4-HOTFIX.jar:?]
    at kr.toxicity.hud.bootstrap.bukkit.player.HudPlayerBukkit.<init>(HudPlayerBukkit.kt:43) ~[BetterHud-1.4-HOTFIX.jar:?]
    at kr.toxicity.hud.bootstrap.bukkit.BukkitBootstrapImpl.register$lambda$24$lambda$23(BukkitBootstrapImpl.kt:321) ~[BetterHud-1.4-HOTFIX.jar:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
    ... 6 more

This is the first issue I encountered.

The second issue occurs when I type any command (e.g., /hud reload), it only returns the following message: image How to solve it?

toxicity188 commented 1 month ago

https://discord.com/channels/1012718460297551943/1216391688378126447/1287503475134955624 Try this please?