Skip to content

Commit

Permalink
patch errors in disguise/fake ent from players logging out
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 17, 2020
1 parent 3bf3334 commit 5c9f9ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Expand Up @@ -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.
//
Expand Down Expand Up @@ -132,7 +133,7 @@ public void sendTo(List<PlayerTag> players) {
new BukkitRunnable() {
@Override
public void run() {
if (!fake.entity.isFakeValid) {
if (!fake.entity.isFakeValid || !player.isOnline()) {
fake = null;
cancel();
return;
Expand Down
Expand Up @@ -89,7 +89,7 @@ public EntityTag sendEntitySpawn(List<PlayerTag> players, EntityType entityType,
new BukkitRunnable() {
@Override
public void run() {
if (!entTag.isFakeValid) {
if (!entTag.isFakeValid || !player.isOnline()) {
cancel();
return;
}
Expand Down
Expand Up @@ -93,7 +93,7 @@ public EntityTag sendEntitySpawn(List<PlayerTag> players, EntityType entityType,
new BukkitRunnable() {
@Override
public void run() {
if (!entTag.isFakeValid) {
if (!entTag.isFakeValid || !player.isOnline()) {
cancel();
return;
}
Expand Down

0 comments on commit 5c9f9ee

Please sign in to comment.