From f41359ce4da3f6332bf1f916bf5cd725ad4035bc Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Thu, 11 Apr 2019 10:53:00 +0200 Subject: [PATCH] Added ISLAND_MEMBERS_COUNT, ISLAND_VISITORS_COUNT, ISLAND_BANS_COUNT #621 --- .../bentobox/lists/GameModePlaceholder.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/world/bentobox/bentobox/lists/GameModePlaceholder.java b/src/main/java/world/bentobox/bentobox/lists/GameModePlaceholder.java index 112534c55..945b98478 100644 --- a/src/main/java/world/bentobox/bentobox/lists/GameModePlaceholder.java +++ b/src/main/java/world/bentobox/bentobox/lists/GameModePlaceholder.java @@ -1,6 +1,7 @@ package world.bentobox.bentobox.lists; import world.bentobox.bentobox.api.placeholders.GameModePlaceholderReplacer; +import world.bentobox.bentobox.managers.RanksManager; import world.bentobox.bentobox.util.Util; import java.text.DateFormat; @@ -44,6 +45,21 @@ public enum GameModePlaceholder { * @since 1.5.0 */ ISLAND_CENTER_Z("island_center_z", (addon, user, island) -> island == null ? "" : String.valueOf(island.getCenter().getBlockZ())), + /** + * Displays the amount of players that are at least MEMBER on this island. + * @since 1.5.0 + */ + ISLAND_MEMBERS_COUNT("island_members_count", (addon, user, island) -> island == null ? "" : String.valueOf(island.getMemberSet(RanksManager.MEMBER_RANK).size())), + /** + * Displays the amount of players that are currently visiting the island. + * @since 1.5.0 + */ + ISLAND_VISITORS_COUNT("island_visitors_count", (addon, user, island) -> island == null ? "" : String.valueOf(island.getVisitors().size())), + /** + * Displays the amount of players banned from the island. + * @since 1.5.0 + */ + ISLAND_BANS_COUNT("island_bans_count", (addon, user, island) -> island == null ? "" : String.valueOf(island.getBanned().size())), /* Player-related */ /**