From 96b781ab0a8624e708195c24ffad7db834f2a83e Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 14 Mar 2019 20:30:20 -0700 Subject: [PATCH] Add super ability config --- Changelog.txt | 14 +++++ .../gmail/nossr50/config/ConfigManager.java | 57 +++++++++++++++++++ .../com/gmail/nossr50/config/MainConfig.java | 1 - .../gmail/nossr50/config/hocon/Backups.java | 7 --- .../nossr50/config/hocon/SuperAbilities.java | 7 --- 5 files changed, 71 insertions(+), 15 deletions(-) delete mode 100644 src/main/java/com/gmail/nossr50/config/hocon/Backups.java delete mode 100644 src/main/java/com/gmail/nossr50/config/hocon/SuperAbilities.java diff --git a/Changelog.txt b/Changelog.txt index 027335d72..2fd513a2d 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -31,6 +31,20 @@ Version 2.2.0 Added config option for showing author paypal info in /mcmmo (previously this was tied to the motd setting) Added config option for showing author patreon links in various commands + Automated backup config options will now be found in "automated_backups.conf" + + Command config options will now be found in "commands.conf" + + Custom item (Chimaera Wing) config options will now be found in "custom_items.conf" + + Language config options will now be found in "language.conf" + + Particle settings will now be found in "particle_spawning.conf" + + Party config options will now be found in "party.conf" + + Notification config options will now be found in "chat_and_hud_notifications.conf" + MOTD (Message of the day) config options will now be found in "motd.conf" MOTD's "MOTD_Enabled" renamed -> "Show-MOTD-On-Player-Join" diff --git a/src/main/java/com/gmail/nossr50/config/ConfigManager.java b/src/main/java/com/gmail/nossr50/config/ConfigManager.java index a7ab10c17..5abaaceb9 100644 --- a/src/main/java/com/gmail/nossr50/config/ConfigManager.java +++ b/src/main/java/com/gmail/nossr50/config/ConfigManager.java @@ -5,13 +5,21 @@ import com.gmail.nossr50.config.collectionconfigs.SalvageConfig; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.config.hocon.SerializedConfigLoader; import com.gmail.nossr50.config.hocon.antiexploit.ConfigExploitPrevention; +import com.gmail.nossr50.config.hocon.backup.ConfigAutomatedBackups; +import com.gmail.nossr50.config.hocon.commands.ConfigCommands; import com.gmail.nossr50.config.hocon.database.ConfigDatabase; import com.gmail.nossr50.config.hocon.donation.ConfigAuthorAdvertisements; import com.gmail.nossr50.config.hocon.hardcore.ConfigHardcore; +import com.gmail.nossr50.config.hocon.items.ConfigItems; +import com.gmail.nossr50.config.hocon.language.ConfigLanguage; import com.gmail.nossr50.config.hocon.metrics.ConfigMetrics; import com.gmail.nossr50.config.hocon.motd.ConfigMOTD; +import com.gmail.nossr50.config.hocon.notifications.ConfigNotifications; +import com.gmail.nossr50.config.hocon.particles.ConfigParticles; +import com.gmail.nossr50.config.hocon.party.ConfigParty; import com.gmail.nossr50.config.hocon.playerleveling.ConfigLeveling; import com.gmail.nossr50.config.hocon.scoreboard.ConfigScoreboard; +import com.gmail.nossr50.config.hocon.superabilities.ConfigSuperAbilities; import com.gmail.nossr50.config.hocon.worldblacklist.ConfigWorldBlacklist; import com.gmail.nossr50.config.party.ItemWeightConfig; import com.gmail.nossr50.config.skills.alchemy.PotionConfig; @@ -77,6 +85,15 @@ public final class ConfigManager { private SerializedConfigLoader configMetrics; private SerializedConfigLoader configMOTD; private SerializedConfigLoader configAuthorAdvertisements; + private SerializedConfigLoader configAutomatedBackups; + private SerializedConfigLoader configCommands; + private SerializedConfigLoader configItems; + private SerializedConfigLoader configLanguage; + private SerializedConfigLoader configParticles; + private SerializedConfigLoader configParty; + private SerializedConfigLoader configNotifications; + private SerializedConfigLoader configSuperAbilities; + private MainConfig mainConfig; private FishingTreasureConfig fishingTreasureConfig; private ExcavationTreasureConfig excavationTreasureConfig; @@ -117,6 +134,14 @@ public final class ConfigManager { configHardcore = new SerializedConfigLoader<>(ConfigHardcore.class, "hardcore_mode.conf", null); configMetrics = new SerializedConfigLoader<>(ConfigMetrics.class, "analytics_reporting.conf", null); configAuthorAdvertisements = new SerializedConfigLoader<>(ConfigAuthorAdvertisements.class, "author_support_advertisements.conf", null); + configAutomatedBackups = new SerializedConfigLoader<>(ConfigAutomatedBackups.class, "automated_backups.conf", null); + configCommands = new SerializedConfigLoader<>(ConfigCommands.class, "commands.conf", null); + configItems = new SerializedConfigLoader<>(ConfigItems.class, "custom_items.conf", null); + configLanguage = new SerializedConfigLoader<>(ConfigLanguage.class, "language.conf", null); + configParticles = new SerializedConfigLoader<>(ConfigParticles.class, "particle_spawning.conf", null); + configParty = new SerializedConfigLoader<>(ConfigParty.class, "party.conf", null); + configNotifications = new SerializedConfigLoader<>(ConfigNotifications.class, "chat_and_hud_notifications.conf", null); + configSuperAbilities = new SerializedConfigLoader<>(ConfigSuperAbilities.class, "skill_super_abilities.conf", null); mainConfig = new MainConfig(); @@ -342,4 +367,36 @@ public final class ConfigManager { public ConfigAuthorAdvertisements getConfigAds() { return configAuthorAdvertisements.getConfig(); } + + public ConfigAutomatedBackups getConfigAutomatedBackups() { + return configAutomatedBackups.getConfig(); + } + + public ConfigCommands getConfigCommands() { + return configCommands.getConfig(); + } + + public ConfigItems getConfigItems() { + return configItems.getConfig(); + } + + public ConfigLanguage getConfigLanguage() { + return configLanguage.getConfig(); + } + + public ConfigParticles getConfigParticles() { + return configParticles.getConfig(); + } + + public ConfigParty getConfigParty() { + return configParty.getConfig(); + } + + public ConfigNotifications getConfigNotifications() { + return configNotifications.getConfig(); + } + + public ConfigSuperAbilities getConfigSuperAbilities() { + return configSuperAbilities.getConfig(); + } } diff --git a/src/main/java/com/gmail/nossr50/config/MainConfig.java b/src/main/java/com/gmail/nossr50/config/MainConfig.java index aa7c8e905..f3514e09d 100644 --- a/src/main/java/com/gmail/nossr50/config/MainConfig.java +++ b/src/main/java/com/gmail/nossr50/config/MainConfig.java @@ -24,7 +24,6 @@ public class MainConfig extends ConfigValidated { public static final String ENABLED = "Enabled"; public static final String LOCALE = "Locale"; public static final String EN_US = "en_us"; - public static final String MOTD = "MOTD_"; public static final String SHOW_PROFILE_LOADED = "Show_Profile_Loaded"; public static final String DONATE_MESSAGE = "Donate_Message"; public static final String MCMMO = "mcmmo"; diff --git a/src/main/java/com/gmail/nossr50/config/hocon/Backups.java b/src/main/java/com/gmail/nossr50/config/hocon/Backups.java deleted file mode 100644 index 6ebf5f901..000000000 --- a/src/main/java/com/gmail/nossr50/config/hocon/Backups.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.gmail.nossr50.config.hocon; - -import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; - -@ConfigSerializable -public class Backups { -} diff --git a/src/main/java/com/gmail/nossr50/config/hocon/SuperAbilities.java b/src/main/java/com/gmail/nossr50/config/hocon/SuperAbilities.java deleted file mode 100644 index 83014c48c..000000000 --- a/src/main/java/com/gmail/nossr50/config/hocon/SuperAbilities.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.gmail.nossr50.config.hocon; - -import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; - -@ConfigSerializable -public class SuperAbilities { -}