From ca33fdb81a46bb154992b1ecb95a261fd03a3000 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 24 May 2020 13:38:29 +1200 Subject: [PATCH] If custom sound group not found, revert to default sound group --- .../libraryaddict/disguise/utilities/sounds/SoundGroup.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 8a5c0a62..45004b8e 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/sounds/SoundGroup.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/sounds/SoundGroup.java @@ -140,7 +140,11 @@ public class SoundGroup { public static SoundGroup getGroup(Disguise disguise) { if (disguise.getSoundGroup() != null) { - return getGroup(disguise.getSoundGroup()); + SoundGroup dSoundGroup = getGroup(disguise.getSoundGroup()); + + if (dSoundGroup != null) { + return dSoundGroup; + } } return getGroup(disguise.getType().name());