Skip to content

Access to Sound#valueOf method through Reflection to avoid java.lang IncompatibleClassChangeError when using versions prior to 1.21.3#158

Merged
Kqliber merged 2 commits intoHelpChat:mainfrom
MemencioPerez:main
Jan 14, 2025
Merged

Access to Sound#valueOf method through Reflection to avoid java.lang IncompatibleClassChangeError when using versions prior to 1.21.3#158
Kqliber merged 2 commits intoHelpChat:mainfrom
MemencioPerez:main

Conversation

@MemencioPerez
Copy link
Contributor

Seems to fix #157

…IncompatibleClassChangeError when using versions prior to 1.21.3
@Tanguygab
Copy link
Collaborator

I think it'd just be better if we finally switched to the method with a String parameter for the sound, that way custom sounds can finally be used. https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Player.html#playSound(org.bukkit.Location,java.lang.String,float,float)

…ttempting to access the Sound#valueOf method through Reflection
@Kqliber Kqliber merged commit 9ae4882 into HelpChat:main Jan 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

java.lang.IncompatibleClassChangeError: Method 'org.bukkit.Sound org.bukkit.Sound.valueOf(java.lang.String)' must be Methodref constant

4 participants