From d4d657e53b41e71e069f74446ea290be7cc34be5 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 12 Apr 2014 17:19:46 +1200 Subject: [PATCH] My bad.. Didn't know GameProfiles were like this in 1.7 --- .../disguise/utilities/ReflectionManager.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/ReflectionManager.java b/src/me/libraryaddict/disguise/utilities/ReflectionManager.java index 467b3c40..7424cc2a 100644 --- a/src/me/libraryaddict/disguise/utilities/ReflectionManager.java +++ b/src/me/libraryaddict/disguise/utilities/ReflectionManager.java @@ -16,18 +16,14 @@ import org.bukkit.inventory.ItemStack; public class ReflectionManager { public enum LibVersion { - V1_6, V1_7, V1_7_3; + V1_6, V1_7; private static LibVersion currentVersion; static { if (getBukkitVersion().startsWith("v1_")) { try { int version = Integer.parseInt(getBukkitVersion().split("_")[1]); if (version == 7) { - if (Integer.parseInt(getBukkitVersion().split("_")[1]) < 3) { - currentVersion = LibVersion.V1_7; - } else { - currentVersion = LibVersion.V1_7_3; - } + currentVersion = LibVersion.V1_7; } else { if (version < 7) { currentVersion = LibVersion.V1_6; @@ -50,11 +46,7 @@ public class ReflectionManager { } public static boolean is1_7() { - return getGameVersion() == V1_7 || getGameVersion() == V1_7_3; - } - - public static boolean is1_7_3() { - return getGameVersion() == V1_7_3; + return getGameVersion() == V1_7; } } @@ -215,7 +207,7 @@ public class ReflectionManager { } public static Object getGameProfile(Player player) { - if (LibVersion.is1_7_3()) { + if (LibVersion.is1_7()) { try { return getNmsClass("EntityHuman").getMethod("getProfile").invoke(getNmsEntity(player)); } catch (Exception ex) {