diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/EcoConfigFactory.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/EcoConfigFactory.java index ba66a397..adf95062 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/EcoConfigFactory.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/EcoConfigFactory.java @@ -4,8 +4,8 @@ import com.willfp.eco.core.EcoPlugin; import com.willfp.eco.core.config.Config; import com.willfp.eco.core.config.JSONConfig; import com.willfp.eco.core.config.wrapper.ConfigFactory; -import com.willfp.eco.internal.config.json.JsonConfigSection; -import com.willfp.eco.internal.config.json.LoadableJsonConfig; +import com.willfp.eco.internal.config.json.JSONConfigSection; +import com.willfp.eco.internal.config.json.LoadableJSONConfig; import com.willfp.eco.internal.config.yaml.LoadableYamlConfig; import com.willfp.eco.internal.config.yaml.UpdatableYamlConfig; import com.willfp.eco.internal.config.yaml.YamlConfigSection; @@ -37,7 +37,7 @@ public class EcoConfigFactory implements ConfigFactory { @NotNull final EcoPlugin plugin, @NotNull final String subDirectoryPath, @NotNull final Class source) { - return new LoadableJsonConfig( + return new LoadableJSONConfig( configName, plugin, subDirectoryPath, @@ -65,6 +65,6 @@ public class EcoConfigFactory implements ConfigFactory { @Override public JSONConfig createJSONConfig(@NotNull final Map values) { - return new JsonConfigSection(values); + return new JSONConfigSection(values); } } diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JsonConfigSection.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JSONConfigSection.java similarity index 65% rename from eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JsonConfigSection.java rename to eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JSONConfigSection.java index 912b8fbc..df72eb65 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JsonConfigSection.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JSONConfigSection.java @@ -4,13 +4,13 @@ import org.jetbrains.annotations.NotNull; import java.util.Map; -public class JsonConfigSection extends JsonConfigWrapper { +public class JSONConfigSection extends JSONConfigWrapper { /** * Config section. * * @param values The values. */ - public JsonConfigSection(@NotNull final Map values) { + public JSONConfigSection(@NotNull final Map values) { this.init(values); } } diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JsonConfigWrapper.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JSONConfigWrapper.java similarity index 94% rename from eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JsonConfigWrapper.java rename to eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JSONConfigWrapper.java index 330b6244..ffbd5e82 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JsonConfigWrapper.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/JSONConfigWrapper.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Set; @SuppressWarnings({"unchecked", "unused"}) -public class JsonConfigWrapper implements JSONConfig, Cloneable { +public class JSONConfigWrapper implements JSONConfig, Cloneable { /** * The linked {@link ConfigurationSection} where values are physically stored. */ @@ -42,7 +42,7 @@ public class JsonConfigWrapper implements JSONConfig, Cloneable { /** * Abstract config. */ - public JsonConfigWrapper() { + public JSONConfigWrapper() { } @@ -88,7 +88,7 @@ public class JsonConfigWrapper implements JSONConfig, Cloneable { } if (values.get(closestPath) instanceof Map && !path.equals(closestPath)) { - JsonConfigSection section = new JsonConfigSection((Map) values.get(closestPath)); + JSONConfigSection section = new JSONConfigSection((Map) values.get(closestPath)); return section.getOfKnownType(path.substring(closestPath.length() + 1), clazz, false); } else { if (values.containsKey(closestPath)) { @@ -115,7 +115,7 @@ public class JsonConfigWrapper implements JSONConfig, Cloneable { list.add(root + key); if (values.get(key) instanceof Map) { - JsonConfigSection section = new JsonConfigSection((Map) values.get(key)); + JSONConfigSection section = new JSONConfigSection((Map) values.get(key)); list.addAll(section.getDeepKeys(list, root + key + ".")); } } @@ -147,14 +147,14 @@ public class JsonConfigWrapper implements JSONConfig, Cloneable { } if (values.get(closestPath) instanceof Map && !path.equals(closestPath)) { - JsonConfigSection section = new JsonConfigSection((Map) values.get(closestPath)); + JSONConfigSection section = new JSONConfigSection((Map) values.get(closestPath)); section.setRecursively(path.substring(closestPath.length() + 1), object, false); values.put(closestPath, section.getValues()); } else { Object obj = object; if (object instanceof JSONConfig) { - obj = ((JsonConfigWrapper) object).getValues(); + obj = ((JSONConfigWrapper) object).getValues(); } values.put(path, obj); @@ -174,7 +174,7 @@ public class JsonConfigWrapper implements JSONConfig, Cloneable { public Config getSubsectionOrNull(@NotNull final String path) { if (values.containsKey(path)) { Map subsection = (Map) values.get(path); - return new JsonConfigSection(subsection); + return new JSONConfigSection(subsection); } else { return null; } @@ -200,7 +200,7 @@ public class JsonConfigWrapper implements JSONConfig, Cloneable { List configs = new ArrayList<>(); for (Map map : maps) { - configs.add(new JsonConfigSection(map)); + configs.add(new JSONConfigSection(map)); } return configs; @@ -349,6 +349,6 @@ public class JsonConfigWrapper implements JSONConfig, Cloneable { @Override public JSONConfig clone() { - return new JsonConfigSection(new HashMap<>(this.getValues())); + return new JSONConfigSection(new HashMap<>(this.getValues())); } } diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/LoadableJsonConfig.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/LoadableJSONConfig.java similarity index 92% rename from eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/LoadableJsonConfig.java rename to eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/LoadableJSONConfig.java index fcb81165..be48051a 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/LoadableJsonConfig.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/LoadableJSONConfig.java @@ -18,7 +18,7 @@ import java.nio.file.StandardOpenOption; import java.util.HashMap; @SuppressWarnings({"unchecked", "unused"}) -public class LoadableJsonConfig extends JsonConfigWrapper implements LoadableConfig { +public class LoadableJSONConfig extends JSONConfigWrapper implements LoadableConfig { /** * The physical config file, as stored on disk. */ @@ -57,10 +57,10 @@ public class LoadableJsonConfig extends JsonConfigWrapper implements LoadableCon * @param subDirectoryPath The subdirectory path. * @param source The class that owns the resource. */ - public LoadableJsonConfig(@NotNull final String configName, - @NotNull final EcoPlugin plugin, - @NotNull final String subDirectoryPath, - @NotNull final Class source) { + public LoadableJSONConfig(@NotNull final String configName, + @NotNull final EcoPlugin plugin, + @NotNull final String subDirectoryPath, + @NotNull final Class source) { this.plugin = plugin; this.name = configName + ".json"; this.source = source;