// Path: src/main/java/de/jeter/chatex/ChatEx.java
// public class ChatEx extends JavaPlugin {
// 
//     private static ChatEx INSTANCE;
//     private UpdateChecker updatechecker = null;
// 
//     @Override
//     public void onEnable() {
//         INSTANCE = this;
// 
//         Config.load();
//         Locales.load();
//         PluginManager.load();
//         ChatLogger.load();
//         RGBColors.load();
// 
//         getServer().getPluginManager().registerEvents(new ChatListener(), this);
//         getServer().getPluginManager().registerEvents(new PlayerListener(), this);
//         getCommand("chatex").setExecutor(new CommandHandler());
// 
//         if (Config.CHECK_UPDATE.getBoolean()) {
//             updatechecker = new UpdateChecker(this, 71041);
//         }
// 
//         ChannelHandler.load();
// 
//         if (Config.B_STATS.getBoolean()) {
//             Metrics metrics = new Metrics(this, 7744);
//             getLogger().info("Thanks for using bstats, it was enabled!");
//         }
// 
//         getLogger().info("is now enabled!");
//     }
// 
//     @Override
//     public void onDisable() {
//         ChatLogger.close();
//         getServer().getScheduler().cancelTasks(this);
//         getLogger().info("is now disabled!");
//     }
// 
//     public static ChatEx getInstance() {
//         return INSTANCE;
//     }
// 
//     public UpdateChecker getUpdateChecker() {
//         return this.updatechecker;
//     }
// }


import de.jeter.chatex.ChatEx;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
    SHOW_NO_RECEIVER_MSG("show-no-players-near", true, "Should we check if any player would receiver your chat message?"),
    RANGE("chat-range", 100, "The range to talk to other players. Set to -1 to enable world-wide-chat"),
    LOGCHAT("logChat", false, "Should the chat be logged?"),
    DEBUG("debug", false, "Should the debug log be enabled?"),
    LOCALE("Locale", "en-EN", "Which language do you want? (You can choose betwenn de-DE, fr-FR, pt-BR and en-EN by default.)"),
    ADS_ENABLED("Ads.Enabled", true, "Should we check for ads?"),
    ADS_BYPASS("Ads.Bypass", Arrays.asList("127.0.0.1", "my-domain.com"), "A list with allowed ips or domains."),
    ADS_LOG("Ads.Log", true, "Should the ads be logged in a file?"),
    ADS_SMART_MANAGER("Ads.SmartManager", true, "Should the \"Smart Manager\" be used? (For more information read: https://github.com/TheJeterLP/ChatEx/wiki/Ad-Manager)"),
    ADS_SMART_DOMAIN_ENDINGS("Ads.SmartConfig.DomainEndings", Arrays.asList(
            "com", "net", "org", "de", "icu", "uk", "ru", "me", "info", "top", "xyz", "tk", "cn", "ga", "cf", "nl", "eu"
    ), "The endings the SmartManager applies the multiplier to."),
    ADS_REPLACE_COMMAS("Ads.ReplaceCommas", false, "Should commas be replaced with \".\" for the add test?"),
    ADS_SMART_MULTIPLIER("Ads.SmartConfig.Multiplier", 4, "If a domain pattern contains an ending from Ads.SmartConfig.DomainEndings the score get multiplied by this number."),
    ADS_SMART_UN_MULTIPLIER("Ads.SmartConfig.UnMultiplier", 1, "If a domain pattern contains NOT an ending from Ads.SmartConfig.DomainEndings the score get multiplied by this number."),
    ADS_THRESHOLD("Ads.Threshold.Block", 0.3, "The threshold required to cancel a message."),
    ADS_REDUCE_THRESHOLD("Ads.Threshold.ReduceThreshold", 0.1, "How much threshold is removed per message"),
    ADS_MAX_LENGTH("Ads.Threshold.MaxLinkLength", 10, "What the max detected link length is (For more information read: https://github.com/TheJeterLP/ChatEx/wiki/Ad-Manager)"),
    ANTISPAM_SECONDS("AntiSpam.Seconds", 5, "The delay between player messages to prevent spam"),
    ANTISPAM_ENABLED("AntiSpam.Enable", true, "Should antispam be enabled?"),
    BLOCKED_WORDS("BlockedWords", Arrays.asList("shit", "@everyone"), "A list of words that should be blocked."),
    CHANGE_TABLIST_NAME("Tablist.Change", true, "Do you want to have the prefixes and suffixes in the tablist?"),
    TABLIST_FORMAT("Tablist.format", "%prefix%player%suffix", "The format of the tablist name"),
    CHANGE_JOIN_AND_QUIT("Messages.JoinAndQuit.Enabled", false, "Do you want to change the join and the quit messages?"),
    RGB_COLORS("colors", null, "Requires 1.16+, Colors you want to use.");

    private final Object value;
    private final String path;
    private final String description;
    private static YamlConfiguration cfg;
// Path: src/main/java/de/jeter/chatex/ChatEx.java
// public class ChatEx extends JavaPlugin {
// 
//     private static ChatEx INSTANCE;
//     private UpdateChecker updatechecker = null;
// 
//     @Override
//     public void onEnable() {
//         INSTANCE = this;
// 
//         Config.load();
//         Locales.load();
//         PluginManager.load();
//         ChatLogger.load();
//         RGBColors.load();
// 
//         getServer().getPluginManager().registerEvents(new ChatListener(), this);
//         getServer().getPluginManager().registerEvents(new PlayerListener(), this);
//         getCommand("chatex").setExecutor(new CommandHandler());
// 
//         if (Config.CHECK_UPDATE.getBoolean()) {
//             updatechecker = new UpdateChecker(this, 71041);
//         }
// 
//         ChannelHandler.load();
// 
//         if (Config.B_STATS.getBoolean()) {
//             Metrics metrics = new Metrics(this, 7744);
//             getLogger().info("Thanks for using bstats, it was enabled!");
//         }
// 
//         getLogger().info("is now enabled!");
//     }
// 
//     @Override
//     public void onDisable() {
//         ChatLogger.close();
//         getServer().getScheduler().cancelTasks(this);
//         getLogger().info("is now disabled!");
//     }
// 
//     public static ChatEx getInstance() {
//         return INSTANCE;
//     }
// 
//     public UpdateChecker getUpdateChecker() {
//         return this.updatechecker;
//     }
// }


// Path: src/main/java/de/jeter/chatex/utils/Config.java
import de.jeter.chatex.ChatEx;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;

    SHOW_NO_RECEIVER_MSG("show-no-players-near", true, "Should we check if any player would receiver your chat message?"),
    RANGE("chat-range", 100, "The range to talk to other players. Set to -1 to enable world-wide-chat"),
    LOGCHAT("logChat", false, "Should the chat be logged?"),
    DEBUG("debug", false, "Should the debug log be enabled?"),
    LOCALE("Locale", "en-EN", "Which language do you want? (You can choose betwenn de-DE, fr-FR, pt-BR and en-EN by default.)"),
    ADS_ENABLED("Ads.Enabled", true, "Should we check for ads?"),
    ADS_BYPASS("Ads.Bypass", Arrays.asList("127.0.0.1", "my-domain.com"), "A list with allowed ips or domains."),
    ADS_LOG("Ads.Log", true, "Should the ads be logged in a file?"),
    ADS_SMART_MANAGER("Ads.SmartManager", true, "Should the \"Smart Manager\" be used? (For more information read: https://github.com/TheJeterLP/ChatEx/wiki/Ad-Manager)"),
    ADS_SMART_DOMAIN_ENDINGS("Ads.SmartConfig.DomainEndings", Arrays.asList(
            "com", "net", "org", "de", "icu", "uk", "ru", "me", "info", "top", "xyz", "tk", "cn", "ga", "cf", "nl", "eu"
    ), "The endings the SmartManager applies the multiplier to."),
    ADS_REPLACE_COMMAS("Ads.ReplaceCommas", false, "Should commas be replaced with \".\" for the add test?"),
    ADS_SMART_MULTIPLIER("Ads.SmartConfig.Multiplier", 4, "If a domain pattern contains an ending from Ads.SmartConfig.DomainEndings the score get multiplied by this number."),
    ADS_SMART_UN_MULTIPLIER("Ads.SmartConfig.UnMultiplier", 1, "If a domain pattern contains NOT an ending from Ads.SmartConfig.DomainEndings the score get multiplied by this number."),
    ADS_THRESHOLD("Ads.Threshold.Block", 0.3, "The threshold required to cancel a message."),
    ADS_REDUCE_THRESHOLD("Ads.Threshold.ReduceThreshold", 0.1, "How much threshold is removed per message"),
    ADS_MAX_LENGTH("Ads.Threshold.MaxLinkLength", 10, "What the max detected link length is (For more information read: https://github.com/TheJeterLP/ChatEx/wiki/Ad-Manager)"),
    ANTISPAM_SECONDS("AntiSpam.Seconds", 5, "The delay between player messages to prevent spam"),
    ANTISPAM_ENABLED("AntiSpam.Enable", true, "Should antispam be enabled?"),
    BLOCKED_WORDS("BlockedWords", Arrays.asList("shit", "@everyone"), "A list of words that should be blocked."),
    CHANGE_TABLIST_NAME("Tablist.Change", true, "Do you want to have the prefixes and suffixes in the tablist?"),
    TABLIST_FORMAT("Tablist.format", "%prefix%player%suffix", "The format of the tablist name"),
    CHANGE_JOIN_AND_QUIT("Messages.JoinAndQuit.Enabled", false, "Do you want to change the join and the quit messages?"),
    RGB_COLORS("colors", null, "Requires 1.16+, Colors you want to use.");

    private final Object value;
    private final String path;
    private final String description;
    private static YamlConfiguration cfg;
    private static final File f = new File(ChatEx.getInstance().getDataFolder(), "config.yml");