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) {
|
||||
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();
|
||||
} /*else if (disguise != null) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
/*else if (disguise != null) {
|
||||
if (namesUuids.containsKey(playerName)) {
|
||||
if (namesUuids.get(playerName) != null) {
|
||||
return UUID.fromString(namesUuids.get(playerName));
|
||||
|
Loading…
Reference in New Issue
Block a user