From 20528cec66cb5fdd40244a1226b1c9369e20a5da Mon Sep 17 00:00:00 2001 From: Super_ Date: Mon, 3 Aug 2020 17:01:18 -0400 Subject: [PATCH] fix format --- .../totalfreedom/tfguilds/config/ConfigEntry.java | 14 ++++++++------ .../java/me/totalfreedom/tfguilds/guild/Guild.java | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/me/totalfreedom/tfguilds/config/ConfigEntry.java b/src/main/java/me/totalfreedom/tfguilds/config/ConfigEntry.java index f9e02f3..57aa3d5 100644 --- a/src/main/java/me/totalfreedom/tfguilds/config/ConfigEntry.java +++ b/src/main/java/me/totalfreedom/tfguilds/config/ConfigEntry.java @@ -6,7 +6,9 @@ import org.bukkit.ChatColor; public enum ConfigEntry { SCHEME_PRIMARY("scheme.primary"), - SCHEME_SECONDARY("scheme.secondary"); + SCHEME_SECONDARY("scheme.secondary"), + // Server + SERVER_GUILD_CHAT_LOGGING_ENABLED("server.guild_chat_logging.enabled"); private final String path; @@ -17,13 +19,13 @@ public enum ConfigEntry private static Config config = TFGuilds.getPlugin().config; + public boolean getBoolean() + { + return config.getBoolean(path); + } + public ChatColor getChatColor() { return ChatColor.valueOf(config.getString(path).toUpperCase()); } - - public static boolean isLoggingGuildChat() - { - return config.getBoolean("server.guild_chat_logging.enabled"); - } } \ No newline at end of file diff --git a/src/main/java/me/totalfreedom/tfguilds/guild/Guild.java b/src/main/java/me/totalfreedom/tfguilds/guild/Guild.java index 17dce96..003e13c 100644 --- a/src/main/java/me/totalfreedom/tfguilds/guild/Guild.java +++ b/src/main/java/me/totalfreedom/tfguilds/guild/Guild.java @@ -291,7 +291,7 @@ public class Guild { broadcast(Common.tl("%s%[%p%Guild Chat %s%| %p%" + GUtil.colorize(name) + "%s%] %p%" + as + ChatColor.WHITE + ": %p%" + msg)); - if (ConfigEntry.isLoggingGuildChat()) + if (ConfigEntry.SERVER_GUILD_CHAT_LOGGING_ENABLED.getBoolean()) { GLog.info(Common.tl("%s%[%p%Guild Chat %s%| %p%" + GUtil.colorize(name) + "%s%] %p%" + as + ChatColor.WHITE + ": %p%" + msg)); }