fix format

This commit is contained in:
Super_ 2020-08-03 17:01:18 -04:00
parent 4261f36826
commit 20528cec66
2 changed files with 9 additions and 7 deletions

View file

@ -6,7 +6,9 @@ import org.bukkit.ChatColor;
public enum ConfigEntry public enum ConfigEntry
{ {
SCHEME_PRIMARY("scheme.primary"), 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; private final String path;
@ -17,13 +19,13 @@ public enum ConfigEntry
private static Config config = TFGuilds.getPlugin().config; private static Config config = TFGuilds.getPlugin().config;
public boolean getBoolean()
{
return config.getBoolean(path);
}
public ChatColor getChatColor() public ChatColor getChatColor()
{ {
return ChatColor.valueOf(config.getString(path).toUpperCase()); return ChatColor.valueOf(config.getString(path).toUpperCase());
} }
public static boolean isLoggingGuildChat()
{
return config.getBoolean("server.guild_chat_logging.enabled");
}
} }

View file

@ -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)); 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)); GLog.info(Common.tl("%s%[%p%Guild Chat %s%| %p%" + GUtil.colorize(name) + "%s%] %p%" + as + ChatColor.WHITE + ": %p%" + msg));
} }