From bd732d256d529fc66c70aa4511b7a09eac46b497 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 27 Jan 2021 19:26:09 +1300 Subject: [PATCH] Hmm --- .../disguise/disguisetypes/PlayerDisguise.java | 6 ------ .../libraryaddict/disguise/utilities/DisguiseUtilities.java | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java index 763933e2..20218edc 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java @@ -699,12 +699,6 @@ public class PlayerDisguise extends TargetedDisguise { return result; } - String name = !DisguiseConfig.isScoreboardNames() ? getName() : getScoreboardName().getPlayer(); - - if (Bukkit.getPlayer(name) == null) { - DisguiseUtilities.getAllScoreboards().forEach(s -> s.resetScores(name)); - } - if (hasScoreboardName()) { if (disguiseBeingReplaced) { new BukkitRunnable() { diff --git a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index e5e3345b..6a08a929 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -1758,6 +1758,10 @@ public class DisguiseUtilities { continue; } + for (String name : t.getEntries()) { + board.resetScores(name); + } + t.unregister(); }