mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-07 19:18:01 +01:00
First sound fix attempt
This commit is contained in:
parent
dd3f395786
commit
b983695531
@ -114,9 +114,15 @@ public class SoundManager {
|
||||
|
||||
String[] sounds = s.split(",", -1);
|
||||
|
||||
// TODO Change sounds to attempt MC name, then fallback to bukkit enum
|
||||
for (String sound : sounds) {
|
||||
try {
|
||||
Sound actualSound = ReflectionManager.fromEnum(Sound.class, sound);
|
||||
Sound actualSound;
|
||||
try {
|
||||
actualSound = Sound.valueOf(sound);
|
||||
} catch (Exception ignored) {
|
||||
actualSound = ReflectionManager.fromEnum(Sound.class, sound);
|
||||
}
|
||||
|
||||
group.addSound(actualSound, type);
|
||||
} catch (Exception ignored) {
|
||||
|
Loading…
Reference in New Issue
Block a user