mirror of
https://github.com/TotalFreedomMC/TFGuilds.git
synced 2024-12-22 07:55:03 +00:00
gchat logging config boolean
This commit is contained in:
parent
27859eddac
commit
b8403f0bf9
3 changed files with 15 additions and 1 deletions
|
@ -21,4 +21,9 @@ public enum ConfigEntry
|
|||
{
|
||||
return ChatColor.valueOf(config.getString(path).toUpperCase());
|
||||
}
|
||||
|
||||
public static boolean isLoggingGuildChat()
|
||||
{
|
||||
return config.getBoolean("server.guild_chat_logging.enabled");
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@ import lombok.Getter;
|
|||
import lombok.Setter;
|
||||
import me.totalfreedom.tfguilds.TFGuilds;
|
||||
import me.totalfreedom.tfguilds.Common;
|
||||
import me.totalfreedom.tfguilds.config.ConfigEntry;
|
||||
import me.totalfreedom.tfguilds.util.GLog;
|
||||
import me.totalfreedom.tfguilds.util.GUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
@ -288,7 +289,11 @@ public class Guild
|
|||
public void chat(String as, String msg)
|
||||
{
|
||||
broadcast(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));
|
||||
|
||||
if (ConfigEntry.isLoggingGuildChat())
|
||||
{
|
||||
GLog.info(Common.tl("%s%[%p%Guild Chat %s%| %p%" + GUtil.colorize(name) + "%s%] %p%" + as + ChatColor.WHITE + ": %p%" + msg));
|
||||
}
|
||||
|
||||
for (Player player : Bukkit.getOnlinePlayers())
|
||||
{
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
# TFGuilds - Configuration
|
||||
#
|
||||
|
||||
server:
|
||||
guild_chat_logging:
|
||||
enabled: true
|
||||
|
||||
scheme:
|
||||
primary: GREEN
|
||||
secondary: DARK_GREEN
|
Loading…
Reference in a new issue