taboolib icon indicating copy to clipboard operation
taboolib copied to clipboard

org.bukkit.sound changes in Bukkit/Spigot api version 1.21.3+

Open EnchantedHay opened this issue 1 year ago • 2 comments

See latest bukkit/spigot api document, and 1.21.1/1.21.2 document for comparison Enum Class Sound → Interface Sound

In the current implementation of Taboolib's Bukkitplayer.kt:

override fun playSound(location: Location, sound: String, volume: Float, pitch: Float) {
        if (volume == -1f && pitch == -1f) {
            player.stopSound(sound)
            return
        }
        player.playSound(location.toBukkitLocation(), Sound.valueOf(sound), volume, pitch)
    }

This will cause a IncompatibleClassChangeError: Method 'org.bukkit.Sound org.bukkit.Sound.valueOf(java.lang.String)' must be InterfaceMethodref constant.

EnchantedHay avatar Dec 06 '24 07:12 EnchantedHay

好的工作!Mojang!

Bkm016 avatar Dec 06 '24 11:12 Bkm016

https://github.com/HelpChat/DeluxeMenus/pull/158 提供一个DeluxeMenus对这个问题的解决方案,帮助大佬解决问题,帮助不了的话当我没说

microvencn avatar Jan 24 '25 15:01 microvencn