Allow prefix to be configurable.

This commit is contained in:
drtshock
2014-10-21 16:52:16 -05:00
committed by t00thpick1
parent 947f82cb2f
commit 33bd9f7e81
2 changed files with 11 additions and 3 deletions

View File

@@ -165,9 +165,11 @@ public class FScoreboard {
}
// Update faction prefix
String prefix = faction.getRelationTo(this.fplayer).getColor() + "[" + faction.getTag().substring(0, Math.min(9, faction.getTag().length())) + "] " + ChatColor.RESET;
if (team.getPrefix() == null || !team.getPrefix().equals(prefix)) {
team.setPrefix(prefix);
if(P.p.getConfig().getBoolean("scoreboard.default-prefixes", false)) {
String prefix = faction.getRelationTo(this.fplayer).getColor() + "[" + faction.getTag().substring(0, Math.min(9, faction.getTag().length())) + "] " + ChatColor.RESET;
if (team.getPrefix() == null || !team.getPrefix().equals(prefix)) {
team.setPrefix(prefix);
}
}
}
}