From 714c37d1c37f57adfda02b2e7191e1743f3e2439 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 24 Apr 2020 16:28:31 +1200 Subject: [PATCH] Added getUniqueTeam(prefix) to DisguiseUtilities for other plugins --- .../libraryaddict/disguise/utilities/DisguiseUtilities.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index 3bd48811..569360af 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -1340,6 +1340,10 @@ public class DisguiseUtilities { } public static String getUniqueTeam() { + return getUniqueTeam("LD_"); + } + + public static String getUniqueTeam(String prefix) { Scoreboard mainBoard = Bukkit.getScoreboardManager().getMainScoreboard(); for (int i = 0; i < 1000; i++) { @@ -1349,7 +1353,7 @@ public class DisguiseUtilities { teamName = teamName.substring(teamName.length() - 13); } - teamName = "LD_" + teamName; + teamName = prefix + teamName; if (mainBoard.getTeam(teamName) != null) { continue;