From 22066523647cce8b5ad9574980b0a4c81511a922 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 29 May 2013 12:27:58 +1200 Subject: [PATCH] Now loops in order --- .../libraryaddict/disguise/DisguiseTypes/DisguiseSound.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java b/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java index d392f730..cf0d4423 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java @@ -63,7 +63,7 @@ public enum DisguiseSound { ZOMBIE(Sound.ZOMBIE_HURT, Sound.STEP_GRASS, Sound.ZOMBIE_DEATH, Sound.ZOMBIE_IDLE, Sound.ZOMBIE_INFECT, Sound.ZOMBIE_METAL, Sound.ZOMBIE_WOODBREAK, Sound.ZOMBIE_WOOD); - + public enum SoundType { CANCEL, DEATH, HURT, IDLE, STEP; } @@ -132,7 +132,9 @@ public enum DisguiseSound { return SoundType.CANCEL; if (disguiseSounds.get(SoundType.STEP) == Sound.STEP_GRASS && name.startsWith("step.")) return SoundType.STEP; - for (SoundType type : disguiseSounds.keySet()) { + for (SoundType type : SoundType.values()) { + if (!disguiseSounds.containsKey(type)) + continue; Sound s = disguiseSounds.get(type); if (s != null) if (CraftSound.getSound(s).equals(name))