From 6b225f18c38276e7b717baa278e8b82a701755f0 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 23 Nov 2013 05:02:53 +1300 Subject: [PATCH] Change the casting checking to look better --- src/me/libraryaddict/disguise/PacketsManager.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/me/libraryaddict/disguise/PacketsManager.java b/src/me/libraryaddict/disguise/PacketsManager.java index 074d121d..b03c0080 100644 --- a/src/me/libraryaddict/disguise/PacketsManager.java +++ b/src/me/libraryaddict/disguise/PacketsManager.java @@ -417,8 +417,7 @@ public class PacketsManager { } catch (Exception e) { e.printStackTrace(); } - if ((obj instanceof Double && ((Double) obj) == 0) - || (obj instanceof Integer && ((Integer) obj) == 0)) { + if (obj instanceof Double ? (Double) obj == 0 : (Integer) obj == 0) { soundType = SoundType.DEATH; } else { obj = null; @@ -548,8 +547,7 @@ public class PacketsManager { } catch (Exception e) { e.printStackTrace(); } - if ((obj instanceof Double && ((Double) obj) == 0) - || (obj instanceof Integer && ((Integer) obj) == 0)) { + if (obj instanceof Double ? (Double) obj == 0 : (Integer) obj == 0) { soundType = SoundType.DEATH; } else { obj = null;