Add radiable as an option for the scoreboard.
This commit is contained in:
parent
8e248c9ea7
commit
49e69b74c8
@ -64,9 +64,10 @@ public class FInfoBoard extends FScoreboard {
|
||||
* @return new String with values instead of placeholders.
|
||||
*/
|
||||
private String replace(String s) {
|
||||
boolean raidable = faction.getLandRounded() > faction.getPower();
|
||||
FPlayer fLeader = faction.getFPlayerAdmin();
|
||||
String leader = fLeader == null ? "Server" : fLeader.getName().substring(0, fLeader.getName().length() > 14 ? 13 : fLeader.getName().length());
|
||||
return ChatColor.translateAlternateColorCodes('&', s.replace("{power}", String.valueOf(faction.getPowerRounded())).replace("{online}", String.valueOf(faction.getOnlinePlayers().size())).replace("{members}", String.valueOf(faction.getFPlayers().size())).replace("{leader}", leader).replace("{chunks}", String.valueOf(faction.getLandRounded())));
|
||||
return ChatColor.translateAlternateColorCodes('&', s.replace("{power}", String.valueOf(faction.getPowerRounded())).replace("{online}", String.valueOf(faction.getOnlinePlayers().size())).replace("{members}", String.valueOf(faction.getFPlayers().size())).replace("{leader}", leader).replace("{chunks}", String.valueOf(faction.getLandRounded())).replace("{raidable}", String.valueOf(raidable)));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ scoreboard:
|
||||
# Things to be replaced in this:
|
||||
# {power} - faction's power. {chunks} - total claimed chunks. {members} - total members.
|
||||
# {online} - online members. {leader} - faction's leader. {open} - shows either true or false if open.
|
||||
# {raidable} - true if the faction can be claimed over, otherwise false.
|
||||
# The title of the scoreboard will be the Faction's tag and colored according to the relation with the player's Faction.
|
||||
# Commenting this section out will cause the info to appear in chat as the plugin originally did.
|
||||
finfo-enabled: false # Default to false to keep original functionality.
|
||||
|
Loading…
Reference in New Issue
Block a user