Fixed tablist not being sent properly on undisguise
This commit is contained in:
parent
0d7370cc81
commit
a6bb739e62
@ -530,6 +530,21 @@ public abstract class Disguise {
|
||||
}
|
||||
}
|
||||
|
||||
// If this disguise is active
|
||||
// Remove the disguise from the current disguises.
|
||||
if (DisguiseUtilities.removeDisguise((TargetedDisguise) this)) {
|
||||
if (getEntity() instanceof Player) {
|
||||
DisguiseUtilities.removeSelfDisguise((Player) getEntity());
|
||||
}
|
||||
|
||||
// Better refresh the entity to undisguise it
|
||||
if (getEntity().isValid()) {
|
||||
DisguiseUtilities.refreshTrackers((TargetedDisguise) this);
|
||||
} else {
|
||||
DisguiseUtilities.destroyEntity((TargetedDisguise) this);
|
||||
}
|
||||
}
|
||||
|
||||
if (isHidePlayer() && getEntity() instanceof Player && ((Player) getEntity()).isOnline()) {
|
||||
PlayerInfoData playerInfo = new PlayerInfoData(
|
||||
ReflectionManager.getGameProfile((Player) getEntity()), 0,
|
||||
@ -553,21 +568,6 @@ public abstract class Disguise {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
// If this disguise is active
|
||||
// Remove the disguise from the current disguises.
|
||||
if (DisguiseUtilities.removeDisguise((TargetedDisguise) this)) {
|
||||
if (getEntity() instanceof Player) {
|
||||
DisguiseUtilities.removeSelfDisguise((Player) getEntity());
|
||||
}
|
||||
|
||||
// Better refresh the entity to undisguise it
|
||||
if (getEntity().isValid()) {
|
||||
DisguiseUtilities.refreshTrackers((TargetedDisguise) this);
|
||||
} else {
|
||||
DisguiseUtilities.destroyEntity((TargetedDisguise) this);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Loop through the disguises because it could be used with a unknown entity id.
|
||||
HashMap<Integer, HashSet<TargetedDisguise>> future = DisguiseUtilities.getFutureDisguises();
|
||||
|
Loading…
Reference in New Issue
Block a user