Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NoSuchMethodError with play sound effect on 1.18 #7016

Merged
merged 2 commits into from
Sep 1, 2024

Conversation

sovdeeth
Copy link
Member

@sovdeeth sovdeeth commented Aug 31, 2024

Description

on 1.18 the entity emitters pr causes playsound to emit:
java.lang.NoSuchMethodError: 'void org.bukkit.entity.Player.playSound(org.bukkit.entity.Entity, java.lang.String, org.bukkit.SoundCategory, float, float)'

This changes the required methodExists check to look for playSound(org.bukkit.entity.Entity, java.lang.String, org.bukkit.SoundCategory, float, float) instead of playSound(org.bukkit.entity.Entity, org.bukkit.Sound, org.bukkit.SoundCategory, float, float), which causes the functionality to be 1.19+ but fixes the bug for now.

Further refactoring should be done to the logic here to allow 1.18 to work with entity emitters too, but it's more involved than I think I can do in a day.


Target Minecraft Versions: any
Requirements: none
Related Issues: none

@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.9 Targeting a 2.9.X version release labels Aug 31, 2024
@APickledWalrus APickledWalrus merged commit 3843781 into SkriptLang:dev/patch Sep 1, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.9 Targeting a 2.9.X version release bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants