From bdc658922fb3b419e8aa25e4a69777852f54dc28 Mon Sep 17 00:00:00 2001 From: Driftay Date: Sun, 13 Oct 2019 11:08:17 -0400 Subject: [PATCH] small fix with placeholder --- src/main/java/com/massivecraft/factions/tag/GeneralTag.java | 4 +++- src/main/resources/config.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/tag/GeneralTag.java b/src/main/java/com/massivecraft/factions/tag/GeneralTag.java index 36d22286..d7eb5aa3 100644 --- a/src/main/java/com/massivecraft/factions/tag/GeneralTag.java +++ b/src/main/java/com/massivecraft/factions/tag/GeneralTag.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.tag; +import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.Factions; import com.massivecraft.factions.FactionsPlugin; import com.massivecraft.factions.zcore.util.TL; @@ -12,7 +13,8 @@ public enum GeneralTag implements Tag { MAX_ALLIES("{max-allies}", () -> getRelation("ally")), MAX_ENEMIES("{max-enemies}", () -> getRelation("enemy")), MAX_TRUCES("{max-truces}", () -> getRelation("truce")), - FACTIONLESS("{factionless}", () -> String.valueOf(Factions.getInstance().getNone().getFPlayersWhereOnline(true).size())), + FACTIONLESS("factionless", () -> String.valueOf(FPlayers.getInstance().getOnlinePlayers().stream().filter(p -> !p.hasFaction()).count())), + FACTIONLESS_TOTAL("factionless-total", () -> String.valueOf(FPlayers.getInstance().getAllFPlayers().stream().filter(p -> !p.hasFaction()).count())), TOTAL_ONLINE("{total-online}", () -> String.valueOf(Bukkit.getOnlinePlayers().size())), ; diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 12441306..2f50344d 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1327,6 +1327,7 @@ Tntfill: # - {offline-list} : Lists all offline members with tooltips # - {alts} : List all alts online or offline # - {truces-list} : Lists each faction truce with tooltips +# - {factionless-total} : Count of all factionless players online # Player variables. Can be used in tooltips.show, scoreboards, or /f show # - {group} : Players group