mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-03 06:28:51 +00:00
Update TABHook.java
This commit is contained in:
1 parent
57676bccc3
commit
d91945978a
1 file changed
+10
-2
@@ -69,8 +69,16 @@ public class TABHook {
|
|||||||
|
|
||||||
public static void removeColorPrefix(Player p, String prefix) {
|
public static void removeColorPrefix(Player p, String prefix) {
|
||||||
TabPlayer tabPlayer = tabAPI.getPlayer(p.getUniqueId());
|
TabPlayer tabPlayer = tabAPI.getPlayer(p.getUniqueId());
|
||||||
prefix = prefix.substring(0, prefix.length() - 2);
|
if(prefix.length() > 2) {
|
||||||
|
prefix = prefix.substring(0, prefix.length() - 2);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Bukkit.getLogger().info("There is an error when removing a color prefix, prefix not long enough:");
|
||||||
|
Bukkit.getLogger().info("Player: " + p.getDisplayName());
|
||||||
|
Bukkit.getLogger().info("Prefix: " + prefix);
|
||||||
|
Bukkit.getLogger().info("------");
|
||||||
|
}
|
||||||
tabAPI.getTablistFormatManager().setPrefix(tabPlayer, Helper.color(prefix));
|
tabAPI.getTablistFormatManager().setPrefix(tabPlayer, Helper.color(prefix));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user