From 4128950c468b7f08a2e80d5fef50fe29397e0172 Mon Sep 17 00:00:00 2001 From: abhiram Date: Thu, 25 Feb 2021 02:01:54 +0530 Subject: [PATCH 1/2] Fixed invalid config path, it was causing tag not displaying --- .idea/TFGuilds.iml | 13 +++++------ .idea/jarRepositories.xml | 22 +++++++++---------- .idea/misc.xml | 4 ++++ .../tfguilds/config/ConfigEntry.java | 7 +++--- .../tfguilds/listener/ChatListener.java | 1 + 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.idea/TFGuilds.iml b/.idea/TFGuilds.iml index fa88e47..163e931 100644 --- a/.idea/TFGuilds.iml +++ b/.idea/TFGuilds.iml @@ -1,5 +1,10 @@ + + + @@ -19,14 +24,6 @@ - - - - - - - - diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml index b008060..bcc693d 100644 --- a/.idea/jarRepositories.xml +++ b/.idea/jarRepositories.xml @@ -6,15 +6,20 @@ \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index cffed5d..d2b0ede 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,9 @@ + + + + diff --git a/src/main/java/me/totalfreedom/tfguilds/config/ConfigEntry.java b/src/main/java/me/totalfreedom/tfguilds/config/ConfigEntry.java index 4f5db02..bd8c900 100644 --- a/src/main/java/me/totalfreedom/tfguilds/config/ConfigEntry.java +++ b/src/main/java/me/totalfreedom/tfguilds/config/ConfigEntry.java @@ -9,17 +9,16 @@ public enum ConfigEntry SCHEME_SECONDARY("scheme.secondary"), // Server GUILD_CHAT_LOGGING_ENABLED("server.guild_chat_logging.enabled"), - GUILD_TAGS_ENABLED("server.guild_tags.enabled"); + GUILD_TAGS_ENABLED("server.guild_tags_enabled.enabled"); private final String path; - + private final Config config; ConfigEntry(String path) { this.path = path; + this.config = TFGuilds.getPlugin().config; } - private static final Config config = TFGuilds.getPlugin().config; - public boolean getBoolean() { return config.getBoolean(path); diff --git a/src/main/java/me/totalfreedom/tfguilds/listener/ChatListener.java b/src/main/java/me/totalfreedom/tfguilds/listener/ChatListener.java index bd3cc51..d819bee 100644 --- a/src/main/java/me/totalfreedom/tfguilds/listener/ChatListener.java +++ b/src/main/java/me/totalfreedom/tfguilds/listener/ChatListener.java @@ -84,6 +84,7 @@ public class ChatListener implements Listener if (guild.hasTag()) { + System.out.println(GUtil.colorize(guild.getTag().replace("%rank%", display)) + ChatColor.RESET + " " + e.getFormat()); e.setFormat(GUtil.colorize(guild.getTag().replace("%rank%", display)) + ChatColor.RESET + " " + e.getFormat()); } } From 65700237626369e68f31dd668b83ebed3eaa21ca Mon Sep 17 00:00:00 2001 From: abhiram Date: Thu, 25 Feb 2021 02:03:15 +0530 Subject: [PATCH 2/2] Fixed invalid config path, it was causing guild tag not displaying --- .idea/checkstyle-idea.xml | 16 ++++++++++++++++ .idea/discord.xml | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 .idea/checkstyle-idea.xml create mode 100644 .idea/discord.xml diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml new file mode 100644 index 0000000..658f152 --- /dev/null +++ b/.idea/checkstyle-idea.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 0000000..cd711a0 --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file