From 8aef2bffc04d6059bab37f449c9332edea2dd5ee Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 20 Nov 2020 13:44:17 +1300 Subject: [PATCH] Fix custom SoundGroup --- .../libraryaddict/disguise/utilities/sounds/SoundGroup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/sounds/SoundGroup.java b/src/main/java/me/libraryaddict/disguise/utilities/sounds/SoundGroup.java index 5a8ff8f7..bd5153ea 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/sounds/SoundGroup.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/sounds/SoundGroup.java @@ -47,8 +47,8 @@ public class SoundGroup { sound = ReflectionManager.getCraftSound((Sound) sound); } else if (sound instanceof String) { sound = ReflectionManager.createSoundEffect((String) sound); - } else if (!sound.getClass().getName().equals("SoundEffect")) { - throw new IllegalArgumentException(); + } else if (!sound.getClass().getSimpleName().equals("SoundEffect")) { + throw new IllegalArgumentException("Unexpected " + sound.getClass()); } if (sound == null) {