mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-13 15:16:50 +01:00
Only return if they are still online. Fixes a bungeecord crash mostly
This commit is contained in:
parent
6571fe3a2d
commit
d20abcb223
2
pom.xml
2
pom.xml
@ -64,7 +64,7 @@
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<version>8.0.4</version>
|
||||
<version>8.0.4-SNAPSHOT</version>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user