diff --git a/bukkit/src/main/java/com/discordsrv/bukkit/BukkitDiscordSRV.java b/bukkit/src/main/java/com/discordsrv/bukkit/BukkitDiscordSRV.java index bd0d6ecd..271d8dbf 100644 --- a/bukkit/src/main/java/com/discordsrv/bukkit/BukkitDiscordSRV.java +++ b/bukkit/src/main/java/com/discordsrv/bukkit/BukkitDiscordSRV.java @@ -41,8 +41,8 @@ import com.discordsrv.bukkit.scheduler.FoliaScheduler; import com.discordsrv.bukkit.scheduler.IBukkitScheduler; import com.discordsrv.common.ServerDiscordSRV; import com.discordsrv.common.command.game.handler.ICommandHandler; -import com.discordsrv.common.config.manager.ConnectionConfigManager; -import com.discordsrv.common.config.manager.MainConfigManager; +import com.discordsrv.common.config.configurate.manager.ConnectionConfigManager; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; import com.discordsrv.common.debug.data.OnlineMode; import com.discordsrv.common.messageforwarding.game.minecrafttodiscord.MinecraftToDiscordChatModule; import com.discordsrv.common.plugin.PluginManager; diff --git a/bukkit/src/main/java/com/discordsrv/bukkit/config/main/BukkitConfig.java b/bukkit/src/main/java/com/discordsrv/bukkit/config/main/BukkitConfig.java index d503ca12..e8d34896 100644 --- a/bukkit/src/main/java/com/discordsrv/bukkit/config/main/BukkitConfig.java +++ b/bukkit/src/main/java/com/discordsrv/bukkit/config/main/BukkitConfig.java @@ -18,7 +18,7 @@ package com.discordsrv.bukkit.config.main; -import com.discordsrv.common.config.annotation.Order; +import com.discordsrv.common.config.configurate.annotation.Order; import com.discordsrv.common.config.main.MainConfig; import com.discordsrv.common.config.main.PluginIntegrationConfig; import com.discordsrv.common.config.main.channels.base.BaseChannelConfig; diff --git a/bukkit/src/main/java/com/discordsrv/bukkit/config/manager/BukkitConfigManager.java b/bukkit/src/main/java/com/discordsrv/bukkit/config/manager/BukkitConfigManager.java index 56a3c7f5..e98bcb44 100644 --- a/bukkit/src/main/java/com/discordsrv/bukkit/config/manager/BukkitConfigManager.java +++ b/bukkit/src/main/java/com/discordsrv/bukkit/config/manager/BukkitConfigManager.java @@ -20,7 +20,7 @@ package com.discordsrv.bukkit.config.manager; import com.discordsrv.bukkit.config.main.BukkitConfig; import com.discordsrv.common.DiscordSRV; -import com.discordsrv.common.config.manager.manager.ServerConfigManager; +import com.discordsrv.common.config.configurate.manager.managers.ServerConfigManager; public class BukkitConfigManager extends ServerConfigManager { diff --git a/bukkit/src/main/java/com/discordsrv/bukkit/config/manager/BukkitConnectionConfigManager.java b/bukkit/src/main/java/com/discordsrv/bukkit/config/manager/BukkitConnectionConfigManager.java index 1d121eb0..f6230cb0 100644 --- a/bukkit/src/main/java/com/discordsrv/bukkit/config/manager/BukkitConnectionConfigManager.java +++ b/bukkit/src/main/java/com/discordsrv/bukkit/config/manager/BukkitConnectionConfigManager.java @@ -20,7 +20,7 @@ package com.discordsrv.bukkit.config.manager; import com.discordsrv.bukkit.config.connection.BukkitConnectionConfig; import com.discordsrv.common.DiscordSRV; -import com.discordsrv.common.config.manager.ConnectionConfigManager; +import com.discordsrv.common.config.configurate.manager.ConnectionConfigManager; public class BukkitConnectionConfigManager extends ConnectionConfigManager { diff --git a/bungee/src/main/java/com/discordsrv/bungee/BungeeDiscordSRV.java b/bungee/src/main/java/com/discordsrv/bungee/BungeeDiscordSRV.java index 14b4bd1c..6a75c547 100644 --- a/bungee/src/main/java/com/discordsrv/bungee/BungeeDiscordSRV.java +++ b/bungee/src/main/java/com/discordsrv/bungee/BungeeDiscordSRV.java @@ -26,8 +26,8 @@ import com.discordsrv.common.ProxyDiscordSRV; import com.discordsrv.common.command.game.handler.ICommandHandler; import com.discordsrv.common.config.connection.ConnectionConfig; import com.discordsrv.common.config.main.MainConfig; -import com.discordsrv.common.config.manager.ConnectionConfigManager; -import com.discordsrv.common.config.manager.MainConfigManager; +import com.discordsrv.common.config.configurate.manager.ConnectionConfigManager; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; import com.discordsrv.common.debug.data.OnlineMode; import com.discordsrv.common.plugin.PluginManager; import com.discordsrv.common.scheduler.StandardScheduler; diff --git a/common/src/main/java/com/discordsrv/common/AbstractDiscordSRV.java b/common/src/main/java/com/discordsrv/common/AbstractDiscordSRV.java index 2c227476..7eba8bbc 100644 --- a/common/src/main/java/com/discordsrv/common/AbstractDiscordSRV.java +++ b/common/src/main/java/com/discordsrv/common/AbstractDiscordSRV.java @@ -37,8 +37,8 @@ import com.discordsrv.common.config.connection.ConnectionConfig; import com.discordsrv.common.config.connection.UpdateConfig; import com.discordsrv.common.config.main.MainConfig; import com.discordsrv.common.config.main.linking.LinkedAccountConfig; -import com.discordsrv.common.config.manager.ConnectionConfigManager; -import com.discordsrv.common.config.manager.MainConfigManager; +import com.discordsrv.common.config.configurate.manager.ConnectionConfigManager; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; import com.discordsrv.common.debug.data.VersionInfo; import com.discordsrv.common.dependency.DiscordSRVDependencyManager; import com.discordsrv.common.discord.api.DiscordAPIEventModule; diff --git a/common/src/main/java/com/discordsrv/common/DiscordSRV.java b/common/src/main/java/com/discordsrv/common/DiscordSRV.java index dddc71e5..077321a3 100644 --- a/common/src/main/java/com/discordsrv/common/DiscordSRV.java +++ b/common/src/main/java/com/discordsrv/common/DiscordSRV.java @@ -28,8 +28,8 @@ import com.discordsrv.common.command.game.handler.ICommandHandler; import com.discordsrv.common.component.ComponentFactory; import com.discordsrv.common.config.connection.ConnectionConfig; import com.discordsrv.common.config.main.MainConfig; -import com.discordsrv.common.config.manager.ConnectionConfigManager; -import com.discordsrv.common.config.manager.MainConfigManager; +import com.discordsrv.common.config.configurate.manager.ConnectionConfigManager; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; import com.discordsrv.common.console.Console; import com.discordsrv.common.debug.data.OnlineMode; import com.discordsrv.common.debug.data.VersionInfo; diff --git a/common/src/main/java/com/discordsrv/common/channel/ChannelConfigHelper.java b/common/src/main/java/com/discordsrv/common/channel/ChannelConfigHelper.java index d42a7e4e..f8530790 100644 --- a/common/src/main/java/com/discordsrv/common/channel/ChannelConfigHelper.java +++ b/common/src/main/java/com/discordsrv/common/channel/ChannelConfigHelper.java @@ -29,7 +29,7 @@ import com.discordsrv.common.config.main.channels.base.ChannelConfig; import com.discordsrv.common.config.main.channels.base.IChannelConfig; import com.discordsrv.common.config.main.generic.ThreadConfig; import com.discordsrv.common.config.main.generic.DestinationConfig; -import com.discordsrv.common.config.manager.MainConfigManager; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; import com.github.benmanes.caffeine.cache.CacheLoader; import com.github.benmanes.caffeine.cache.LoadingCache; import org.apache.commons.lang3.tuple.Pair; @@ -85,14 +85,14 @@ public class ChannelConfigHelper { throws SerializationException { MainConfigManager configManager = discordSRV.configManager(); - CommentedConfigurationNode defaultNode = CommentedConfigurationNode.root(configManager.configNodeOptions()); - CommentedConfigurationNode target = CommentedConfigurationNode.root(configManager.configNodeOptions()); + CommentedConfigurationNode defaultNode = CommentedConfigurationNode.root(configManager.nodeOptions()); + CommentedConfigurationNode target = CommentedConfigurationNode.root(configManager.nodeOptions()); - configManager.configObjectMapper() + configManager.objectMapper() .get((Class) defaultConfig.getClass()) .save(defaultConfig, defaultNode); - ObjectMapper mapper = configManager.configObjectMapper() + ObjectMapper mapper = configManager.objectMapper() .get((Class) config.getClass()); mapper.save(config, target); diff --git a/common/src/main/java/com/discordsrv/common/config/annotation/DefaultOnly.java b/common/src/main/java/com/discordsrv/common/config/configurate/annotation/DefaultOnly.java similarity index 96% rename from common/src/main/java/com/discordsrv/common/config/annotation/DefaultOnly.java rename to common/src/main/java/com/discordsrv/common/config/configurate/annotation/DefaultOnly.java index 0d444b97..e6554f07 100644 --- a/common/src/main/java/com/discordsrv/common/config/annotation/DefaultOnly.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/annotation/DefaultOnly.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.annotation; +package com.discordsrv.common.config.configurate.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/common/src/main/java/com/discordsrv/common/config/annotation/Order.java b/common/src/main/java/com/discordsrv/common/config/configurate/annotation/Order.java similarity index 95% rename from common/src/main/java/com/discordsrv/common/config/annotation/Order.java rename to common/src/main/java/com/discordsrv/common/config/configurate/annotation/Order.java index 68a09e52..4d3a95a2 100644 --- a/common/src/main/java/com/discordsrv/common/config/annotation/Order.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/annotation/Order.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.annotation; +package com.discordsrv.common.config.configurate.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/common/src/main/java/com/discordsrv/common/config/annotation/Untranslated.java b/common/src/main/java/com/discordsrv/common/config/configurate/annotation/Untranslated.java similarity index 97% rename from common/src/main/java/com/discordsrv/common/config/annotation/Untranslated.java rename to common/src/main/java/com/discordsrv/common/config/configurate/annotation/Untranslated.java index 3e916978..194f3a76 100644 --- a/common/src/main/java/com/discordsrv/common/config/annotation/Untranslated.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/annotation/Untranslated.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.annotation; +package com.discordsrv.common.config.configurate.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/common/src/main/java/com/discordsrv/common/config/fielddiscoverer/OrderedFieldDiscovererProxy.java b/common/src/main/java/com/discordsrv/common/config/configurate/fielddiscoverer/OrderedFieldDiscovererProxy.java similarity index 94% rename from common/src/main/java/com/discordsrv/common/config/fielddiscoverer/OrderedFieldDiscovererProxy.java rename to common/src/main/java/com/discordsrv/common/config/configurate/fielddiscoverer/OrderedFieldDiscovererProxy.java index 863e682f..edc9fc52 100644 --- a/common/src/main/java/com/discordsrv/common/config/fielddiscoverer/OrderedFieldDiscovererProxy.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/fielddiscoverer/OrderedFieldDiscovererProxy.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.fielddiscoverer; +package com.discordsrv.common.config.configurate.fielddiscoverer; import org.checkerframework.checker.nullness.qual.Nullable; import org.spongepowered.configurate.objectmapping.FieldData; @@ -30,6 +30,10 @@ import java.util.ArrayList; import java.util.Comparator; import java.util.List; +/** + * Proxy for {@link com.discordsrv.common.config.configurate.annotation.Order}. + * @param T of proxied {@link FieldDiscoverer} + */ public class OrderedFieldDiscovererProxy implements FieldDiscoverer { private final FieldDiscoverer fieldDiscoverer; diff --git a/common/src/main/java/com/discordsrv/common/config/manager/ConnectionConfigManager.java b/common/src/main/java/com/discordsrv/common/config/configurate/manager/ConnectionConfigManager.java similarity index 80% rename from common/src/main/java/com/discordsrv/common/config/manager/ConnectionConfigManager.java rename to common/src/main/java/com/discordsrv/common/config/configurate/manager/ConnectionConfigManager.java index 8093f4a4..089b1103 100644 --- a/common/src/main/java/com/discordsrv/common/config/manager/ConnectionConfigManager.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/manager/ConnectionConfigManager.java @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.manager; +package com.discordsrv.common.config.configurate.manager; import com.discordsrv.common.DiscordSRV; +import com.discordsrv.common.config.configurate.manager.loader.YamlConfigLoaderProvider; import com.discordsrv.common.config.connection.ConnectionConfig; -import com.discordsrv.common.config.manager.loader.YamlConfigLoaderProvider; -import com.discordsrv.common.config.manager.manager.TranslatedConfigManager; +import com.discordsrv.common.config.configurate.manager.managers.TranslatedConfigManager; import org.spongepowered.configurate.ConfigurationOptions; import org.spongepowered.configurate.objectmapping.ObjectMapper; import org.spongepowered.configurate.yaml.YamlConfigurationLoader; @@ -35,8 +35,8 @@ public abstract class ConnectionConfigManager } @Override - public ConfigurationOptions defaultOptions(ObjectMapper.Factory objectMapper) { - return super.defaultOptions(objectMapper) + public ConfigurationOptions configurationOptions(ObjectMapper.Factory objectMapper) { + return super.configurationOptions(objectMapper) .header(ConnectionConfig.HEADER); } diff --git a/common/src/main/java/com/discordsrv/common/config/manager/MainConfigManager.java b/common/src/main/java/com/discordsrv/common/config/configurate/manager/MainConfigManager.java similarity index 80% rename from common/src/main/java/com/discordsrv/common/config/manager/MainConfigManager.java rename to common/src/main/java/com/discordsrv/common/config/configurate/manager/MainConfigManager.java index aa720e6b..11147a88 100644 --- a/common/src/main/java/com/discordsrv/common/config/manager/MainConfigManager.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/manager/MainConfigManager.java @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.manager; +package com.discordsrv.common.config.configurate.manager; import com.discordsrv.common.DiscordSRV; +import com.discordsrv.common.config.configurate.manager.loader.YamlConfigLoaderProvider; import com.discordsrv.common.config.main.MainConfig; -import com.discordsrv.common.config.manager.loader.YamlConfigLoaderProvider; -import com.discordsrv.common.config.manager.manager.TranslatedConfigManager; +import com.discordsrv.common.config.configurate.manager.managers.TranslatedConfigManager; import org.spongepowered.configurate.ConfigurationOptions; import org.spongepowered.configurate.objectmapping.ObjectMapper; import org.spongepowered.configurate.yaml.YamlConfigurationLoader; @@ -35,8 +35,8 @@ public abstract class MainConfigManager } @Override - public ConfigurationOptions defaultOptions(ObjectMapper.Factory objectMapper) { - return super.defaultOptions(objectMapper) + public ConfigurationOptions configurationOptions(ObjectMapper.Factory objectMapper) { + return super.configurationOptions(objectMapper) .header(MainConfig.HEADER); } diff --git a/common/src/main/java/com/discordsrv/common/config/manager/loader/ConfigLoaderProvider.java b/common/src/main/java/com/discordsrv/common/config/configurate/manager/loader/ConfigLoaderProvider.java similarity index 96% rename from common/src/main/java/com/discordsrv/common/config/manager/loader/ConfigLoaderProvider.java rename to common/src/main/java/com/discordsrv/common/config/configurate/manager/loader/ConfigLoaderProvider.java index 2b2d9822..d20d46fc 100644 --- a/common/src/main/java/com/discordsrv/common/config/manager/loader/ConfigLoaderProvider.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/manager/loader/ConfigLoaderProvider.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.manager.loader; +package com.discordsrv.common.config.configurate.manager.loader; import org.jetbrains.annotations.ApiStatus; import org.spongepowered.configurate.CommentedConfigurationNode; diff --git a/common/src/main/java/com/discordsrv/common/config/manager/loader/YamlConfigLoaderProvider.java b/common/src/main/java/com/discordsrv/common/config/configurate/manager/loader/YamlConfigLoaderProvider.java similarity index 97% rename from common/src/main/java/com/discordsrv/common/config/manager/loader/YamlConfigLoaderProvider.java rename to common/src/main/java/com/discordsrv/common/config/configurate/manager/loader/YamlConfigLoaderProvider.java index 5802ed62..7d67cc49 100644 --- a/common/src/main/java/com/discordsrv/common/config/manager/loader/YamlConfigLoaderProvider.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/manager/loader/YamlConfigLoaderProvider.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.manager.loader; +package com.discordsrv.common.config.configurate.manager.loader; import org.jetbrains.annotations.ApiStatus; import org.spongepowered.configurate.loader.AbstractConfigurationLoader; diff --git a/common/src/main/java/com/discordsrv/common/config/manager/manager/ConfigManager.java b/common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ConfigManager.java similarity index 94% rename from common/src/main/java/com/discordsrv/common/config/manager/manager/ConfigManager.java rename to common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ConfigManager.java index fc541d3b..cec1d43c 100644 --- a/common/src/main/java/com/discordsrv/common/config/manager/manager/ConfigManager.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ConfigManager.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.manager.manager; +package com.discordsrv.common.config.configurate.manager.managers; import com.discordsrv.common.exception.ConfigException; diff --git a/common/src/main/java/com/discordsrv/common/config/manager/manager/ConfigurateConfigManager.java b/common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ConfigurateConfigManager.java similarity index 83% rename from common/src/main/java/com/discordsrv/common/config/manager/manager/ConfigurateConfigManager.java rename to common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ConfigurateConfigManager.java index 8cebb7ed..617a8c0e 100644 --- a/common/src/main/java/com/discordsrv/common/config/manager/manager/ConfigurateConfigManager.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ConfigurateConfigManager.java @@ -16,23 +16,23 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.manager.manager; +package com.discordsrv.common.config.configurate.manager.managers; import com.discordsrv.api.color.Color; import com.discordsrv.api.discord.entity.message.DiscordMessageEmbed; import com.discordsrv.api.discord.entity.message.SendableDiscordMessage; import com.discordsrv.common.DiscordSRV; -import com.discordsrv.common.config.annotation.DefaultOnly; -import com.discordsrv.common.config.annotation.Order; -import com.discordsrv.common.config.fielddiscoverer.OrderedFieldDiscovererProxy; +import com.discordsrv.common.config.configurate.annotation.DefaultOnly; +import com.discordsrv.common.config.configurate.annotation.Order; +import com.discordsrv.common.config.configurate.fielddiscoverer.OrderedFieldDiscovererProxy; import com.discordsrv.common.config.main.channels.base.BaseChannelConfig; import com.discordsrv.common.config.main.channels.base.ChannelConfig; import com.discordsrv.common.config.main.channels.base.IChannelConfig; -import com.discordsrv.common.config.manager.loader.ConfigLoaderProvider; -import com.discordsrv.common.config.serializer.ColorSerializer; -import com.discordsrv.common.config.serializer.DiscordMessageEmbedSerializer; -import com.discordsrv.common.config.serializer.PatternSerializer; -import com.discordsrv.common.config.serializer.SendableDiscordMessageSerializer; +import com.discordsrv.common.config.configurate.manager.loader.ConfigLoaderProvider; +import com.discordsrv.common.config.configurate.serializer.ColorSerializer; +import com.discordsrv.common.config.configurate.serializer.DiscordMessageEmbedSerializer; +import com.discordsrv.common.config.configurate.serializer.PatternSerializer; +import com.discordsrv.common.config.configurate.serializer.SendableDiscordMessageSerializer; import com.discordsrv.common.exception.ConfigException; import org.jetbrains.annotations.Nullable; import org.spongepowered.configurate.*; @@ -70,8 +70,8 @@ public abstract class ConfigurateConfigManager> fieldOrder = Comparator.comparingInt(data -> { Order order = data.annotations().getAnnotation(Order.class); return order != null ? order.value() : 0; @@ -180,12 +180,12 @@ public abstract class ConfigurateConfigManager((FieldDiscoverer) FieldDiscoverer.record(), fieldOrder)); } - public ObjectMapper.Factory.Builder configObjectMapperBuilder() { - return objectMapperBuilder(); + public ObjectMapper.Factory.Builder objectMapperBuilder() { + return commonObjectMapperBuilder(); } - protected ObjectMapper.Factory.Builder defaultObjectMapperBuilder() { - return objectMapperBuilder() + protected ObjectMapper.Factory.Builder cleanObjectMapperBuilder() { + return commonObjectMapperBuilder() .addProcessor(DefaultOnly.class, (data, value) -> (value1, destination) -> { String[] children = data.value(); boolean whitelist = data.whitelist(); @@ -219,20 +219,27 @@ public abstract class ConfigurateConfigManager) defaultConfig.getClass()).save(defaultConfig, node); return node; } @@ -252,10 +263,6 @@ public abstract class ConfigurateConfigManager) defaultConfig.getClass()) .load(node); } catch (ConfigurateException e) { @@ -312,6 +319,6 @@ public abstract class ConfigurateConfigManager clazz, CommentedConfigurationNode node) throws SerializationException { - configObjectMapper().get(clazz).save(config, node); + objectMapper().get(clazz).save(config, node); } } diff --git a/common/src/main/java/com/discordsrv/common/config/manager/manager/ProxyConfigManager.java b/common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ProxyConfigManager.java similarity index 92% rename from common/src/main/java/com/discordsrv/common/config/manager/manager/ProxyConfigManager.java rename to common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ProxyConfigManager.java index 74d4060e..25bde8bb 100644 --- a/common/src/main/java/com/discordsrv/common/config/manager/manager/ProxyConfigManager.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ProxyConfigManager.java @@ -16,14 +16,14 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.manager.manager; +package com.discordsrv.common.config.configurate.manager.managers; import com.discordsrv.common.DiscordSRV; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; import com.discordsrv.common.config.main.MainConfig; import com.discordsrv.common.config.main.channels.base.IChannelConfig; import com.discordsrv.common.config.main.channels.base.proxy.ProxyBaseChannelConfig; import com.discordsrv.common.config.main.channels.base.proxy.ProxyChannelConfig; -import com.discordsrv.common.config.manager.MainConfigManager; import org.spongepowered.configurate.objectmapping.ObjectMapper; public abstract class ProxyConfigManager extends MainConfigManager { diff --git a/common/src/main/java/com/discordsrv/common/config/manager/manager/ServerConfigManager.java b/common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ServerConfigManager.java similarity index 92% rename from common/src/main/java/com/discordsrv/common/config/manager/manager/ServerConfigManager.java rename to common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ServerConfigManager.java index 2e5cb100..03ce8339 100644 --- a/common/src/main/java/com/discordsrv/common/config/manager/manager/ServerConfigManager.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/ServerConfigManager.java @@ -16,14 +16,14 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.manager.manager; +package com.discordsrv.common.config.configurate.manager.managers; import com.discordsrv.common.DiscordSRV; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; import com.discordsrv.common.config.main.MainConfig; import com.discordsrv.common.config.main.channels.base.IChannelConfig; import com.discordsrv.common.config.main.channels.base.server.ServerBaseChannelConfig; import com.discordsrv.common.config.main.channels.base.server.ServerChannelConfig; -import com.discordsrv.common.config.manager.MainConfigManager; import org.spongepowered.configurate.objectmapping.ObjectMapper; public abstract class ServerConfigManager extends MainConfigManager { diff --git a/common/src/main/java/com/discordsrv/common/config/manager/manager/TranslatedConfigManager.java b/common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/TranslatedConfigManager.java similarity index 95% rename from common/src/main/java/com/discordsrv/common/config/manager/manager/TranslatedConfigManager.java rename to common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/TranslatedConfigManager.java index 40b8fa45..d3db5119 100644 --- a/common/src/main/java/com/discordsrv/common/config/manager/manager/TranslatedConfigManager.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/manager/managers/TranslatedConfigManager.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.manager.manager; +package com.discordsrv.common.config.configurate.manager.managers; import com.discordsrv.common.DiscordSRV; import com.discordsrv.common.config.Config; @@ -53,8 +53,8 @@ public abstract class TranslatedConfigManager. */ -package com.discordsrv.common.config.serializer; +package com.discordsrv.common.config.configurate.serializer; import com.discordsrv.api.color.Color; import org.checkerframework.checker.nullness.qual.Nullable; diff --git a/common/src/main/java/com/discordsrv/common/config/serializer/DiscordMessageEmbedSerializer.java b/common/src/main/java/com/discordsrv/common/config/configurate/serializer/DiscordMessageEmbedSerializer.java similarity index 97% rename from common/src/main/java/com/discordsrv/common/config/serializer/DiscordMessageEmbedSerializer.java rename to common/src/main/java/com/discordsrv/common/config/configurate/serializer/DiscordMessageEmbedSerializer.java index ffe96ede..f582ffc2 100644 --- a/common/src/main/java/com/discordsrv/common/config/serializer/DiscordMessageEmbedSerializer.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/serializer/DiscordMessageEmbedSerializer.java @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.serializer; +package com.discordsrv.common.config.configurate.serializer; import com.discordsrv.api.color.Color; import com.discordsrv.api.discord.entity.message.DiscordMessageEmbed; -import com.discordsrv.common.config.manager.manager.ConfigurateConfigManager; +import com.discordsrv.common.config.configurate.manager.managers.ConfigurateConfigManager; import net.dv8tion.jda.api.entities.Role; import org.checkerframework.checker.nullness.qual.Nullable; import org.spongepowered.configurate.ConfigurationNode; diff --git a/common/src/main/java/com/discordsrv/common/config/serializer/PatternSerializer.java b/common/src/main/java/com/discordsrv/common/config/configurate/serializer/PatternSerializer.java similarity index 96% rename from common/src/main/java/com/discordsrv/common/config/serializer/PatternSerializer.java rename to common/src/main/java/com/discordsrv/common/config/configurate/serializer/PatternSerializer.java index e8b4864a..0f2450a0 100644 --- a/common/src/main/java/com/discordsrv/common/config/serializer/PatternSerializer.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/serializer/PatternSerializer.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.serializer; +package com.discordsrv.common.config.configurate.serializer; import org.checkerframework.checker.nullness.qual.Nullable; import org.spongepowered.configurate.ConfigurationNode; diff --git a/common/src/main/java/com/discordsrv/common/config/serializer/SendableDiscordMessageSerializer.java b/common/src/main/java/com/discordsrv/common/config/configurate/serializer/SendableDiscordMessageSerializer.java similarity index 96% rename from common/src/main/java/com/discordsrv/common/config/serializer/SendableDiscordMessageSerializer.java rename to common/src/main/java/com/discordsrv/common/config/configurate/serializer/SendableDiscordMessageSerializer.java index 398c0562..153e1db2 100644 --- a/common/src/main/java/com/discordsrv/common/config/serializer/SendableDiscordMessageSerializer.java +++ b/common/src/main/java/com/discordsrv/common/config/configurate/serializer/SendableDiscordMessageSerializer.java @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -package com.discordsrv.common.config.serializer; +package com.discordsrv.common.config.configurate.serializer; import com.discordsrv.api.discord.entity.message.DiscordMessageEmbed; import com.discordsrv.api.discord.entity.message.SendableDiscordMessage; -import com.discordsrv.common.config.manager.manager.ConfigurateConfigManager; +import com.discordsrv.common.config.configurate.manager.managers.ConfigurateConfigManager; import org.checkerframework.checker.nullness.qual.Nullable; import org.spongepowered.configurate.ConfigurationNode; import org.spongepowered.configurate.serialize.SerializationException; diff --git a/common/src/main/java/com/discordsrv/common/config/main/AvatarProviderConfig.java b/common/src/main/java/com/discordsrv/common/config/main/AvatarProviderConfig.java index bf875a74..817b3c35 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/AvatarProviderConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/AvatarProviderConfig.java @@ -1,6 +1,6 @@ package com.discordsrv.common.config.main; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.Untranslated; import org.spongepowered.configurate.objectmapping.ConfigSerializable; import org.spongepowered.configurate.objectmapping.meta.Comment; diff --git a/common/src/main/java/com/discordsrv/common/config/main/MainConfig.java b/common/src/main/java/com/discordsrv/common/config/main/MainConfig.java index c62c4160..651913de 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/MainConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/MainConfig.java @@ -20,8 +20,8 @@ package com.discordsrv.common.config.main; import com.discordsrv.api.channel.GameChannel; import com.discordsrv.common.config.Config; -import com.discordsrv.common.config.annotation.DefaultOnly; -import com.discordsrv.common.config.annotation.Order; +import com.discordsrv.common.config.configurate.annotation.DefaultOnly; +import com.discordsrv.common.config.configurate.annotation.Order; import com.discordsrv.common.config.connection.ConnectionConfig; import com.discordsrv.common.config.main.channels.base.BaseChannelConfig; import com.discordsrv.common.config.main.channels.base.ChannelConfig; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/DiscordToMinecraftChatConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/DiscordToMinecraftChatConfig.java index 2368d1d5..916bd2e9 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/DiscordToMinecraftChatConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/DiscordToMinecraftChatConfig.java @@ -18,7 +18,7 @@ package com.discordsrv.common.config.main.channels; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.Untranslated; import com.discordsrv.common.config.main.generic.DiscordIgnoresConfig; import org.spongepowered.configurate.objectmapping.ConfigSerializable; import org.spongepowered.configurate.objectmapping.meta.Comment; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/JoinMessageConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/JoinMessageConfig.java index 742480a7..59cc76c9 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/JoinMessageConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/JoinMessageConfig.java @@ -21,7 +21,7 @@ package com.discordsrv.common.config.main.channels; import com.discordsrv.api.discord.entity.message.DiscordMessageEmbed; import com.discordsrv.api.discord.entity.message.SendableDiscordMessage; import com.discordsrv.api.event.events.message.receive.game.JoinMessageReceiveEvent; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.Untranslated; import com.discordsrv.common.config.main.generic.IMessageConfig; import org.jetbrains.annotations.Nullable; import org.spongepowered.configurate.objectmapping.ConfigSerializable; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/LeaveMessageConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/LeaveMessageConfig.java index 14c9e34b..d023d388 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/LeaveMessageConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/LeaveMessageConfig.java @@ -20,7 +20,7 @@ package com.discordsrv.common.config.main.channels; import com.discordsrv.api.discord.entity.message.DiscordMessageEmbed; import com.discordsrv.api.discord.entity.message.SendableDiscordMessage; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.Untranslated; import com.discordsrv.common.config.main.generic.IMessageConfig; import org.spongepowered.configurate.objectmapping.ConfigSerializable; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/MinecraftToDiscordChatConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/MinecraftToDiscordChatConfig.java index 162ad216..37f3e2c3 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/MinecraftToDiscordChatConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/MinecraftToDiscordChatConfig.java @@ -19,8 +19,8 @@ package com.discordsrv.common.config.main.channels; import com.discordsrv.api.discord.entity.message.SendableDiscordMessage; -import com.discordsrv.common.config.annotation.DefaultOnly; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.DefaultOnly; +import com.discordsrv.common.config.configurate.annotation.Untranslated; import com.discordsrv.common.config.main.generic.IMessageConfig; import org.spongepowered.configurate.objectmapping.ConfigSerializable; import org.spongepowered.configurate.objectmapping.meta.Comment; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/StartMessageConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/StartMessageConfig.java index dce05e3e..8ca8a19f 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/StartMessageConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/StartMessageConfig.java @@ -19,7 +19,7 @@ package com.discordsrv.common.config.main.channels; import com.discordsrv.api.discord.entity.message.SendableDiscordMessage; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.Untranslated; import com.discordsrv.common.config.main.generic.IMessageConfig; import org.spongepowered.configurate.objectmapping.ConfigSerializable; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/StopMessageConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/StopMessageConfig.java index b95a5e4f..63b2a077 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/StopMessageConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/StopMessageConfig.java @@ -19,7 +19,7 @@ package com.discordsrv.common.config.main.channels; import com.discordsrv.api.discord.entity.message.SendableDiscordMessage; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.Untranslated; import com.discordsrv.common.config.main.generic.IMessageConfig; import org.spongepowered.configurate.objectmapping.ConfigSerializable; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/base/BaseChannelConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/base/BaseChannelConfig.java index 4f1e533c..22748a0e 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/base/BaseChannelConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/base/BaseChannelConfig.java @@ -18,8 +18,7 @@ package com.discordsrv.common.config.main.channels.base; -import com.discordsrv.common.config.annotation.Order; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.Order; import com.discordsrv.common.config.main.channels.*; import org.spongepowered.configurate.objectmapping.ConfigSerializable; import org.spongepowered.configurate.objectmapping.meta.Comment; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/base/proxy/ProxyBaseChannelConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/base/proxy/ProxyBaseChannelConfig.java index 3a76e63f..4c2be601 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/base/proxy/ProxyBaseChannelConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/base/proxy/ProxyBaseChannelConfig.java @@ -18,7 +18,7 @@ package com.discordsrv.common.config.main.channels.base.proxy; -import com.discordsrv.common.config.annotation.Order; +import com.discordsrv.common.config.configurate.annotation.Order; import com.discordsrv.common.config.main.channels.JoinMessageConfig; import com.discordsrv.common.config.main.channels.proxy.ServerSwitchMessageConfig; import com.discordsrv.common.config.main.channels.base.BaseChannelConfig; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/base/server/ServerBaseChannelConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/base/server/ServerBaseChannelConfig.java index 5b222d6a..1d707a88 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/base/server/ServerBaseChannelConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/base/server/ServerBaseChannelConfig.java @@ -18,7 +18,7 @@ package com.discordsrv.common.config.main.channels.base.server; -import com.discordsrv.common.config.annotation.Order; +import com.discordsrv.common.config.configurate.annotation.Order; import com.discordsrv.common.config.main.channels.server.AwardMessageConfig; import com.discordsrv.common.config.main.channels.server.DeathMessageConfig; import com.discordsrv.common.config.main.channels.base.BaseChannelConfig; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/proxy/ServerSwitchMessageConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/proxy/ServerSwitchMessageConfig.java index e3b2edf6..5bd1914f 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/proxy/ServerSwitchMessageConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/proxy/ServerSwitchMessageConfig.java @@ -20,7 +20,7 @@ package com.discordsrv.common.config.main.channels.proxy; import com.discordsrv.api.discord.entity.message.DiscordMessageEmbed; import com.discordsrv.api.discord.entity.message.SendableDiscordMessage; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.Untranslated; import com.discordsrv.common.config.main.generic.IMessageConfig; import org.spongepowered.configurate.objectmapping.ConfigSerializable; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/server/AwardMessageConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/server/AwardMessageConfig.java index 08d7cd64..f6c91bb0 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/server/AwardMessageConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/server/AwardMessageConfig.java @@ -20,7 +20,7 @@ package com.discordsrv.common.config.main.channels.server; import com.discordsrv.api.discord.entity.message.DiscordMessageEmbed; import com.discordsrv.api.discord.entity.message.SendableDiscordMessage; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.Untranslated; import com.discordsrv.common.config.main.generic.IMessageConfig; import org.spongepowered.configurate.objectmapping.ConfigSerializable; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/server/DeathMessageConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/server/DeathMessageConfig.java index c214c63b..0247708a 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/server/DeathMessageConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/server/DeathMessageConfig.java @@ -20,7 +20,7 @@ package com.discordsrv.common.config.main.channels.server; import com.discordsrv.api.discord.entity.message.DiscordMessageEmbed; import com.discordsrv.api.discord.entity.message.SendableDiscordMessage; -import com.discordsrv.common.config.annotation.Untranslated; +import com.discordsrv.common.config.configurate.annotation.Untranslated; import com.discordsrv.common.config.main.generic.IMessageConfig; import org.spongepowered.configurate.objectmapping.ConfigSerializable; diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/server/ServerJoinMessageConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/server/ServerJoinMessageConfig.java index 1c7f151a..4cf63838 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/server/ServerJoinMessageConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/server/ServerJoinMessageConfig.java @@ -18,7 +18,7 @@ package com.discordsrv.common.config.main.channels.server; -import com.discordsrv.common.config.annotation.Order; +import com.discordsrv.common.config.configurate.annotation.Order; import com.discordsrv.common.config.main.channels.JoinMessageConfig; import org.jetbrains.annotations.Nullable; diff --git a/common/src/main/java/com/discordsrv/common/config/main/linking/RequiredLinkingConfig.java b/common/src/main/java/com/discordsrv/common/config/main/linking/RequiredLinkingConfig.java index 2ed19286..ef9d605f 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/linking/RequiredLinkingConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/linking/RequiredLinkingConfig.java @@ -18,7 +18,7 @@ package com.discordsrv.common.config.main.linking; -import com.discordsrv.common.config.annotation.Order; +import com.discordsrv.common.config.configurate.annotation.Order; import org.spongepowered.configurate.objectmapping.ConfigSerializable; @ConfigSerializable diff --git a/common/src/main/java/com/discordsrv/common/config/main/linking/RequirementsConfig.java b/common/src/main/java/com/discordsrv/common/config/main/linking/RequirementsConfig.java index 7b69fbc5..f1f21fd8 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/linking/RequirementsConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/linking/RequirementsConfig.java @@ -18,7 +18,7 @@ package com.discordsrv.common.config.main.linking; -import com.discordsrv.common.config.annotation.DefaultOnly; +import com.discordsrv.common.config.configurate.annotation.DefaultOnly; import com.discordsrv.common.config.connection.ConnectionConfig; import org.spongepowered.configurate.objectmapping.ConfigSerializable; import org.spongepowered.configurate.objectmapping.meta.Comment; diff --git a/common/src/main/java/com/discordsrv/common/config/main/linking/ServerRequiredLinkingConfig.java b/common/src/main/java/com/discordsrv/common/config/main/linking/ServerRequiredLinkingConfig.java index 39da0acb..cb19f3e4 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/linking/ServerRequiredLinkingConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/linking/ServerRequiredLinkingConfig.java @@ -18,7 +18,7 @@ package com.discordsrv.common.config.main.linking; -import com.discordsrv.common.config.annotation.Order; +import com.discordsrv.common.config.configurate.annotation.Order; import org.spongepowered.configurate.objectmapping.ConfigSerializable; import org.spongepowered.configurate.objectmapping.meta.Comment; import org.spongepowered.configurate.objectmapping.meta.Setting; diff --git a/common/src/test/java/com/discordsrv/common/MockDiscordSRV.java b/common/src/test/java/com/discordsrv/common/MockDiscordSRV.java index 72f656e8..8f2ba059 100644 --- a/common/src/test/java/com/discordsrv/common/MockDiscordSRV.java +++ b/common/src/test/java/com/discordsrv/common/MockDiscordSRV.java @@ -24,9 +24,9 @@ import com.discordsrv.common.command.game.handler.ICommandHandler; import com.discordsrv.common.config.connection.ConnectionConfig; import com.discordsrv.common.config.main.MainConfig; import com.discordsrv.common.config.main.PluginIntegrationConfig; -import com.discordsrv.common.config.manager.ConnectionConfigManager; -import com.discordsrv.common.config.manager.MainConfigManager; -import com.discordsrv.common.config.manager.manager.ServerConfigManager; +import com.discordsrv.common.config.configurate.manager.ConnectionConfigManager; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; +import com.discordsrv.common.config.configurate.manager.managers.ServerConfigManager; import com.discordsrv.common.console.Console; import com.discordsrv.common.debug.data.OnlineMode; import com.discordsrv.common.logging.Logger; diff --git a/i18n/src/main/java/com/discordsrv/config/DiscordSRVTranslation.java b/i18n/src/main/java/com/discordsrv/config/DiscordSRVTranslation.java index 06222474..87ea5d77 100644 --- a/i18n/src/main/java/com/discordsrv/config/DiscordSRVTranslation.java +++ b/i18n/src/main/java/com/discordsrv/config/DiscordSRVTranslation.java @@ -22,9 +22,9 @@ import com.discordsrv.bukkit.config.manager.BukkitConfigManager; import com.discordsrv.bukkit.config.manager.BukkitConnectionConfigManager; import com.discordsrv.common.DiscordSRV; import com.discordsrv.common.config.Config; -import com.discordsrv.common.config.annotation.Untranslated; -import com.discordsrv.common.config.manager.manager.ConfigurateConfigManager; -import com.discordsrv.common.config.manager.manager.TranslatedConfigManager; +import com.discordsrv.common.config.configurate.annotation.Untranslated; +import com.discordsrv.common.config.configurate.manager.managers.ConfigurateConfigManager; +import com.discordsrv.common.config.configurate.manager.managers.TranslatedConfigManager; import org.spongepowered.configurate.CommentedConfigurationNode; import org.spongepowered.configurate.ConfigurateException; import org.spongepowered.configurate.ConfigurationNode; @@ -82,12 +82,12 @@ public final class DiscordSRVTranslation { String fileIdentifier = config.getFileName(); ConfigurationNode commentSection = node.node(fileIdentifier + "_comments"); - String header = configManager.configNodeOptions().header(); + String header = configManager.nodeOptions().header(); if (header != null) { commentSection.node("$header").set(header); } - ObjectMapper.Factory mapperFactory = configManager.configObjectMapperBuilder() + ObjectMapper.Factory mapperFactory = configManager.objectMapperBuilder() .addProcessor(Untranslated.class, untranslatedProcessorFactory) .build(); diff --git a/i18n/src/main/java/com/discordsrv/config/MockDiscordSRV.java b/i18n/src/main/java/com/discordsrv/config/MockDiscordSRV.java index 3dae5f31..8b653c61 100644 --- a/i18n/src/main/java/com/discordsrv/config/MockDiscordSRV.java +++ b/i18n/src/main/java/com/discordsrv/config/MockDiscordSRV.java @@ -24,8 +24,8 @@ import com.discordsrv.common.bootstrap.LifecycleManager; import com.discordsrv.common.command.game.handler.ICommandHandler; import com.discordsrv.common.config.connection.ConnectionConfig; import com.discordsrv.common.config.main.MainConfig; -import com.discordsrv.common.config.manager.ConnectionConfigManager; -import com.discordsrv.common.config.manager.MainConfigManager; +import com.discordsrv.common.config.configurate.manager.ConnectionConfigManager; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; import com.discordsrv.common.console.Console; import com.discordsrv.common.debug.data.OnlineMode; import com.discordsrv.common.logging.Logger; diff --git a/i18n/src/main/java/com/discordsrv/config/TranslationConfigManagerProxy.java b/i18n/src/main/java/com/discordsrv/config/TranslationConfigManagerProxy.java index 896b7687..4b5061d1 100644 --- a/i18n/src/main/java/com/discordsrv/config/TranslationConfigManagerProxy.java +++ b/i18n/src/main/java/com/discordsrv/config/TranslationConfigManagerProxy.java @@ -19,8 +19,8 @@ package com.discordsrv.config; import com.discordsrv.common.DiscordSRV; -import com.discordsrv.common.config.manager.loader.YamlConfigLoaderProvider; -import com.discordsrv.common.config.manager.manager.ConfigurateConfigManager; +import com.discordsrv.common.config.configurate.manager.loader.YamlConfigLoaderProvider; +import com.discordsrv.common.config.configurate.manager.managers.ConfigurateConfigManager; import org.spongepowered.configurate.objectmapping.ObjectMapper; import org.spongepowered.configurate.yaml.YamlConfigurationLoader; @@ -38,13 +38,13 @@ public class TranslationConfigManagerProxy } @Override - public ObjectMapper.Factory configObjectMapper() { - return objectMapper != null ? objectMapper : super.configObjectMapper(); + public ObjectMapper.Factory objectMapper() { + return objectMapper != null ? objectMapper : super.objectMapper(); } @Override - public ObjectMapper.Factory defaultObjectMapper() { - return objectMapper != null ? objectMapper : super.defaultObjectMapper(); + public ObjectMapper.Factory cleanObjectMapper() { + return objectMapper != null ? objectMapper : super.cleanObjectMapper(); } @Override diff --git a/sponge/src/main/java/com/discordsrv/sponge/SpongeDiscordSRV.java b/sponge/src/main/java/com/discordsrv/sponge/SpongeDiscordSRV.java index 21b397f7..a143a58d 100644 --- a/sponge/src/main/java/com/discordsrv/sponge/SpongeDiscordSRV.java +++ b/sponge/src/main/java/com/discordsrv/sponge/SpongeDiscordSRV.java @@ -23,8 +23,8 @@ import com.discordsrv.common.ServerDiscordSRV; import com.discordsrv.common.command.game.handler.ICommandHandler; import com.discordsrv.common.config.connection.ConnectionConfig; import com.discordsrv.common.config.main.MainConfig; -import com.discordsrv.common.config.manager.ConnectionConfigManager; -import com.discordsrv.common.config.manager.MainConfigManager; +import com.discordsrv.common.config.configurate.manager.ConnectionConfigManager; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; import com.discordsrv.common.debug.data.OnlineMode; import com.discordsrv.common.plugin.PluginManager; import com.discordsrv.sponge.console.SpongeConsole; diff --git a/velocity/src/main/java/com/discordsrv/velocity/VelocityDiscordSRV.java b/velocity/src/main/java/com/discordsrv/velocity/VelocityDiscordSRV.java index dcb57188..c1f8c46f 100644 --- a/velocity/src/main/java/com/discordsrv/velocity/VelocityDiscordSRV.java +++ b/velocity/src/main/java/com/discordsrv/velocity/VelocityDiscordSRV.java @@ -22,8 +22,8 @@ import com.discordsrv.common.ProxyDiscordSRV; import com.discordsrv.common.command.game.handler.ICommandHandler; import com.discordsrv.common.config.connection.ConnectionConfig; import com.discordsrv.common.config.main.MainConfig; -import com.discordsrv.common.config.manager.ConnectionConfigManager; -import com.discordsrv.common.config.manager.MainConfigManager; +import com.discordsrv.common.config.configurate.manager.ConnectionConfigManager; +import com.discordsrv.common.config.configurate.manager.MainConfigManager; import com.discordsrv.common.debug.data.OnlineMode; import com.discordsrv.common.plugin.PluginManager; import com.discordsrv.common.scheduler.StandardScheduler;