diff --git a/pom.xml b/pom.xml index 64d8f251..ad8c3710 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ 3.1.0 - 8.0.4 + 8.0.4-SNAPSHOT diff --git a/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index 17d30321..3bbe0d0a 100644 --- a/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -302,8 +302,17 @@ public class DisguiseUtilities { if (LibVersion.getGameVersion() == LibVersion.V1_7) { Player p = Bukkit.getPlayerExact(playerName); if (p != null) { - return p.getUniqueId(); - } /*else if (disguise != null) { + try { + Field field = ReflectionManager.getNmsClass("PlayerConnection").getDeclaredField("processedDisconnect"); + field.setAccessible(true); + if (field.getBoolean(ReflectionManager.getNmsClass("EntityPlayer").getField("playerConnection") + .get(p.getClass().getDeclaredMethod("getHandle").invoke(p)))) + return p.getUniqueId(); + } catch (Exception e) { + e.printStackTrace(); + } + } + /*else if (disguise != null) { if (namesUuids.containsKey(playerName)) { if (namesUuids.get(playerName) != null) { return UUID.fromString(namesUuids.get(playerName)); @@ -341,7 +350,7 @@ public class DisguiseUtilities { } }); } - }*/ + }*/ } return null; }