From 1a3dc507878f0f6bda8b8bf38dde1c48cdc4843c Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 30 Mar 2017 01:34:42 +1300 Subject: [PATCH] Another small fix --- .../disguise/utilities/DisguiseUtilities.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index dd8c335f..9d98c61a 100644 --- a/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -1118,9 +1118,10 @@ public class DisguiseUtilities { Scoreboard scoreboard = player.getScoreboard(); Team prevTeam = scoreboard.getEntryTeam(player.getName()); Team ldTeam = null; + String ldTeamName = "LD Pushing"; // If the player is in a team already - if (prevTeam != null) { + if (prevTeam != null && !prevTeam.getName().equals("LD Pushing")) { // If we're creating a scoreboard if (pOption == DisguisePushing.CREATE_SCOREBOARD) { // Remember his old team so we can give him it back later @@ -1129,10 +1130,10 @@ public class DisguiseUtilities { // We're modifying the scoreboard ldTeam = prevTeam; } + } else { + prevTeam = null; } - String ldTeamName = "LD Pushing"; - // If we are creating a new scoreboard because the current one must not be modified if (pOption == DisguisePushing.CREATE_SCOREBOARD) { // If they have a team, we'll reuse that name. Otherwise go for another name