mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-08 19:28:10 +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);
|
String[] sounds = s.split(",", -1);
|
||||||
|
|
||||||
|
// TODO Change sounds to attempt MC name, then fallback to bukkit enum
|
||||||
for (String sound : sounds) {
|
for (String sound : sounds) {
|
||||||
try {
|
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);
|
group.addSound(actualSound, type);
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
|
Loading…
Reference in New Issue
Block a user