diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/DisguiseCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/DisguiseCommand.java index fa5e208e16..0a1c754a15 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/DisguiseCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/DisguiseCommand.java @@ -42,7 +42,8 @@ public DisguiseCommand() { // The entity will still visibly behave the same as the real entity type does. // // Be warned that the replacement is imperfect, and visual or internal-client errors may arise from using this command. - // This command should not be used to disguise players in their own view. + // + // If you disguise a player to themself, they will see a slightly-lagging-behind copy of the disguise entity. // // The disguise will last until a server restart, or the cancel option is used. // @@ -132,7 +133,7 @@ public void sendTo(List players) { new BukkitRunnable() { @Override public void run() { - if (!fake.entity.isFakeValid) { + if (!fake.entity.isFakeValid || !player.isOnline()) { fake = null; cancel(); return; diff --git a/v1_15/src/main/java/com/denizenscript/denizen/nms/v1_15/helpers/PlayerHelperImpl.java b/v1_15/src/main/java/com/denizenscript/denizen/nms/v1_15/helpers/PlayerHelperImpl.java index feb035ed08..c5f72bdc14 100644 --- a/v1_15/src/main/java/com/denizenscript/denizen/nms/v1_15/helpers/PlayerHelperImpl.java +++ b/v1_15/src/main/java/com/denizenscript/denizen/nms/v1_15/helpers/PlayerHelperImpl.java @@ -89,7 +89,7 @@ public EntityTag sendEntitySpawn(List players, EntityType entityType, new BukkitRunnable() { @Override public void run() { - if (!entTag.isFakeValid) { + if (!entTag.isFakeValid || !player.isOnline()) { cancel(); return; } diff --git a/v1_16/src/main/java/com/denizenscript/denizen/nms/v1_16/helpers/PlayerHelperImpl.java b/v1_16/src/main/java/com/denizenscript/denizen/nms/v1_16/helpers/PlayerHelperImpl.java index 0118974cfa..1f36f35459 100644 --- a/v1_16/src/main/java/com/denizenscript/denizen/nms/v1_16/helpers/PlayerHelperImpl.java +++ b/v1_16/src/main/java/com/denizenscript/denizen/nms/v1_16/helpers/PlayerHelperImpl.java @@ -93,7 +93,7 @@ public EntityTag sendEntitySpawn(List players, EntityType entityType, new BukkitRunnable() { @Override public void run() { - if (!entTag.isFakeValid) { + if (!entTag.isFakeValid || !player.isOnline()) { cancel(); return; }