mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-01 14:38:55 +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) {
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user