From 2fe608aec2809de0290b185e4a45cdf159e82fee Mon Sep 17 00:00:00 2001 From: Fabrizio La Rosa Date: Wed, 8 Jul 2020 08:07:42 +0200 Subject: [PATCH] Fixed %fabledskyblock_island_maxmembers% not working --- .../skyblock/placeholder/PlaceholderManager.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/com/songoda/skyblock/placeholder/PlaceholderManager.java b/src/main/java/com/songoda/skyblock/placeholder/PlaceholderManager.java index 84f4e00c..8f4d1463 100644 --- a/src/main/java/com/songoda/skyblock/placeholder/PlaceholderManager.java +++ b/src/main/java/com/songoda/skyblock/placeholder/PlaceholderManager.java @@ -231,6 +231,15 @@ public class PlaceholderManager { configLoad.getString("Placeholder.fabledskyblock_island_members.Non-empty.Message") .replace("%placeholder", "" + island.getRole(IslandRole.Member).size())); } + } else if (placeholder.equalsIgnoreCase("fabledskyblock_island_maxmembers")) { + if (island == null) { + return ChatColor.translateAlternateColorCodes('&', + configLoad.getString("Placeholder.fabledskyblock_island_maxmembers.Empty.Message")); + } else { + return ChatColor.translateAlternateColorCodes('&', + configLoad.getString("Placeholder.fabledskyblock_island_maxmembers.Non-empty.Message") + .replace("%placeholder", "" + island.getMaxMembers())); + } } else if (placeholder.equalsIgnoreCase("fabledskyblock_island_operators")) { if (island == null) { return ChatColor.translateAlternateColorCodes('&', @@ -426,6 +435,7 @@ public class PlaceholderManager { placeholders.add("fabledskyblock_island_bans"); placeholders.add("fabledskyblock_island_members_total"); placeholders.add("fabledskyblock_island_members"); + placeholders.add("fabledskyblock_island_maxmembers"); placeholders.add("fabledskyblock_island_operators"); placeholders.add("fabledskyblock_island_coops"); placeholders.add("fabledskyblock_island_coops_total");