From 6ae7d703b06af053741598753c86ab01e579ff08 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 23 Jul 2013 02:06:19 +1200 Subject: [PATCH] Fix a npe --- src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java b/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java index 66ad4170..39730489 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java @@ -159,7 +159,8 @@ public enum DisguiseSound { public SoundType getType(String name, boolean ignoreDamage) { if (isCancelSound(name)) return SoundType.CANCEL; - if (disguiseSounds.get(SoundType.STEP).startsWith("step.") && name.startsWith("step.")) + if (disguiseSounds.containsKey(SoundType.STEP) && disguiseSounds.get(SoundType.STEP).startsWith("step.") + && name.startsWith("step.")) return SoundType.STEP; for (SoundType type : SoundType.values()) { if (!disguiseSounds.containsKey(type) || type == SoundType.DEATH || (ignoreDamage && type == SoundType.HURT))