From 3371e6a859bf2f0d9600e1eb31a182c7622a47f2 Mon Sep 17 00:00:00 2001 From: Esophose Date: Fri, 22 Mar 2019 23:44:32 -0600 Subject: [PATCH] Add placeholder fabledskyblock_island_exists --- .../skyblock/placeholder/PlaceholderManager.java | 10 +++++++++- src/main/resources/language.yml | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/goodandevil/skyblock/placeholder/PlaceholderManager.java b/src/main/java/me/goodandevil/skyblock/placeholder/PlaceholderManager.java index 0a5e4c38..09c4ab9a 100644 --- a/src/main/java/me/goodandevil/skyblock/placeholder/PlaceholderManager.java +++ b/src/main/java/me/goodandevil/skyblock/placeholder/PlaceholderManager.java @@ -69,7 +69,15 @@ public class PlaceholderManager { Config config = skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml")); FileConfiguration configLoad = config.getFileConfiguration(); - if (placeholder.equalsIgnoreCase("fabledskyblock_island_size")) { + if (placeholder.equalsIgnoreCase("fabledskyblock_island_exists")) { + if (island == null) { + return ChatColor.translateAlternateColorCodes('&', + configLoad.getString("Placeholder.fabledskyblock_island_exists.False.Message")); + } else { + return ChatColor.translateAlternateColorCodes('&', + configLoad.getString("Placeholder.fabledskyblock_island_exists.True.Message")); + } + } else if (placeholder.equalsIgnoreCase("fabledskyblock_island_size")) { if (island == null) { return ChatColor.translateAlternateColorCodes('&', configLoad.getString("Placeholder.fabledskyblock_island_size.Empty.Message")); diff --git a/src/main/resources/language.yml b/src/main/resources/language.yml index 3d16bc28..506788a8 100644 --- a/src/main/resources/language.yml +++ b/src/main/resources/language.yml @@ -1090,6 +1090,11 @@ Placeholder: Message: "&f&oUnclaimed" Non-empty: Message: "&f[%position] %player [%votes]" + fabledskyblock_island_exists: + True: + Message: "&atrue" + False: + Message: "&cfalse" fabledskyblock_island_size: Empty: Message: "&c0"