From 590afd86d8659a5e0acd4abaac14bafe127f5af7 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 12 Jul 2013 08:33:26 +1200 Subject: [PATCH] Stop comparing values to classes --- src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java b/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java index 61bda2a9..716f52f4 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java @@ -249,11 +249,13 @@ public class Disguise { HashMap entity = Values.getMetaValues(DisguiseType.getType(type)); HashMap disguise = Values.getMetaValues(getType()); for (int i : entity.keySet()) { - if (!disguise.containsKey(i) || entity.get(i) != disguise.get(i) || entity.get(i).getClass() != disguise.get(i)) { - if (disguise.containsKey(i)) + if (!disguise.containsKey(i) || entity.get(i) != disguise.get(i) + || entity.get(i).getClass() != disguise.get(i).getClass()) { + if (disguise.containsKey(i)) { watcher.setValue(i, disguise.get(i)); - else + } else { watcher.setValue(i, null); + } } } }