Always remove disguise and update if necessary
This commit is contained in:
parent
7bb0008b42
commit
36f9f25116
@ -379,14 +379,15 @@ public abstract class Disguise {
|
|||||||
HashMap<Integer, HashSet<TargetedDisguise>> disguises = DisguiseUtilities.getDisguises();
|
HashMap<Integer, HashSet<TargetedDisguise>> disguises = DisguiseUtilities.getDisguises();
|
||||||
// If this disguise has a entity set
|
// If this disguise has a entity set
|
||||||
if (getEntity() != null) {
|
if (getEntity() != null) {
|
||||||
// If the entity is valid
|
// If this disguise is active
|
||||||
if (getEntity().isValid()) {
|
// Remove the disguise from the current disguises.
|
||||||
// If this disguise is active
|
if (DisguiseUtilities.removeDisguise((TargetedDisguise) this)) {
|
||||||
// Remove the disguise from the current disguises.
|
if (getEntity() instanceof Player) {
|
||||||
if (DisguiseUtilities.removeDisguise((TargetedDisguise) this)) {
|
DisguiseUtilities.removeSelfDisguise((Player) getEntity());
|
||||||
if (getEntity() instanceof Player) {
|
}
|
||||||
DisguiseUtilities.removeSelfDisguise((Player) getEntity());
|
|
||||||
}
|
// If the entity is not dead
|
||||||
|
if (getEntity().isValid()) {
|
||||||
// Better refresh the entity to undisguise it
|
// Better refresh the entity to undisguise it
|
||||||
DisguiseUtilities.refreshTrackers((TargetedDisguise) this);
|
DisguiseUtilities.refreshTrackers((TargetedDisguise) this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user