From 9fc5b78fa02d4efb958a52f1cf07efca4547ded0 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 14 Jul 2021 16:09:35 +0200 Subject: [PATCH] The config changes dont end --- eco-api/build.gradle | 3 +- .../core/config/{ => interfaces}/Config.java | 2 +- .../core/config/interfaces/JSONConfig.java | 29 +++++++++++ .../{ => interfaces}/LoadableConfig.java | 2 +- .../interfaces/WrappedYamlConfiguration.java | 12 +++++ .../eco/core/config/json/JSONConfig.java | 32 ++++-------- ...eConfig.java => JSONStaticBaseConfig.java} | 4 +- .../core/config/json/LoadableJSONConfig.java | 7 --- .../json/wrapper/JSONConfigWrapper.java | 6 +-- .../wrapper/LoadableJSONConfigWrapper.java | 21 ++++---- .../core/config/updating/ConfigHandler.java | 2 +- .../core/config/wrapper/ConfigFactory.java | 12 ++--- .../core/config/wrapper/ConfigWrapper.java | 2 +- .../core/config/yaml/LoadableYamlConfig.java | 8 --- .../eco/core/config/yaml/YamlBaseConfig.java | 1 - .../eco/core/config/yaml/YamlConfig.java | 3 +- .../wrapper/LoadableYamlConfigWrapper.java | 21 ++++---- .../yaml/wrapper/WrappedYamlBukkitConfig.java | 12 ----- .../yaml/wrapper/YamlConfigWrapper.java | 9 ++-- .../java/com/willfp/eco/core/data/Data.java | 10 ++-- eco-core/core-backend/build.gradle | 3 +- .../eco/internal/config/EcoConfigFactory.java | 52 +++++++++---------- ...Section.java => EcoJSONConfigSection.java} | 4 +- ...Wrapper.java => EcoJSONConfigWrapper.java} | 22 ++++---- ...Config.java => EcoLoadableJSONConfig.java} | 11 ++-- .../config/updating/EcoConfigHandler.java | 6 +-- ...Config.java => EcoLoadableYamlConfig.java} | 7 +-- ...onfig.java => EcoUpdatableYamlConfig.java} | 4 +- ...Section.java => EcoYamlConfigSection.java} | 4 +- ...Wrapper.java => EcoYamlConfigWrapper.java} | 16 ++---- .../eco/internal/drops/DropManager.java | 2 +- eco-core/core-plugin/build.gradle | 2 +- .../willfp/eco/spigot/config/DataJson.java | 4 +- 33 files changed, 169 insertions(+), 166 deletions(-) rename eco-api/src/main/java/com/willfp/eco/core/config/{ => interfaces}/Config.java (99%) create mode 100644 eco-api/src/main/java/com/willfp/eco/core/config/interfaces/JSONConfig.java rename eco-api/src/main/java/com/willfp/eco/core/config/{ => interfaces}/LoadableConfig.java (93%) create mode 100644 eco-api/src/main/java/com/willfp/eco/core/config/interfaces/WrappedYamlConfiguration.java rename eco-api/src/main/java/com/willfp/eco/core/config/json/{JsonStaticBaseConfig.java => JSONStaticBaseConfig.java} (84%) delete mode 100644 eco-api/src/main/java/com/willfp/eco/core/config/json/LoadableJSONConfig.java delete mode 100644 eco-api/src/main/java/com/willfp/eco/core/config/yaml/LoadableYamlConfig.java delete mode 100644 eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/WrappedYamlBukkitConfig.java rename eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/{JSONConfigSection.java => EcoJSONConfigSection.java} (61%) rename eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/{JSONConfigWrapper.java => EcoJSONConfigWrapper.java} (92%) rename eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/json/{LoadableJSONConfig.java => EcoLoadableJSONConfig.java} (90%) rename eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/{LoadableYamlConfig.java => EcoLoadableYamlConfig.java} (91%) rename eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/{UpdatableYamlConfig.java => EcoUpdatableYamlConfig.java} (96%) rename eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/{YamlConfigSection.java => EcoYamlConfigSection.java} (61%) rename eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/{YamlConfigWrapper.java => EcoYamlConfigWrapper.java} (93%) diff --git a/eco-api/build.gradle b/eco-api/build.gradle index 1f440e13..f6107fec 100644 --- a/eco-api/build.gradle +++ b/eco-api/build.gradle @@ -6,11 +6,10 @@ group 'com.willfp' version rootProject.version dependencies { - compileOnly 'org.spigotmc:spigot:1.17-R0.1-SNAPSHOT' + compileOnly 'org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT' compileOnly 'org.apache.maven:maven-artifact:3.0.3' compileOnly 'org.bstats:bstats-bukkit:1.7' compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.0-SNAPSHOT' - compileOnly 'me.clip:placeholderapi:2.10.9' compileOnly 'com.google.code.gson:gson:2.8.7' } diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/Config.java b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/Config.java similarity index 99% rename from eco-api/src/main/java/com/willfp/eco/core/config/Config.java rename to eco-api/src/main/java/com/willfp/eco/core/config/interfaces/Config.java index 82fa6220..e6f525ae 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/Config.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/Config.java @@ -1,4 +1,4 @@ -package com.willfp.eco.core.config; +package com.willfp.eco.core.config.interfaces; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/JSONConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/JSONConfig.java new file mode 100644 index 00000000..1a3e588b --- /dev/null +++ b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/JSONConfig.java @@ -0,0 +1,29 @@ +package com.willfp.eco.core.config.interfaces; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public interface JSONConfig extends Config { + /** + * Get a list of subsections from config. + * + * @param path The key to fetch the value from. + * @return The found value, or a blank {@link java.util.ArrayList} if not found. + */ + @NotNull + List getSubsections(@NotNull String path); + + /** + * Get a list of subsections from config. + * + * @param path The key to fetch the value from. + * @return The found value, or null if not found. + */ + @Nullable + List getSubsectionsOrNull(@NotNull String path); + + @Override + JSONConfig clone(); +} diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/LoadableConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/LoadableConfig.java similarity index 93% rename from eco-api/src/main/java/com/willfp/eco/core/config/LoadableConfig.java rename to eco-api/src/main/java/com/willfp/eco/core/config/interfaces/LoadableConfig.java index 56f1410e..38670f84 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/LoadableConfig.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/LoadableConfig.java @@ -1,4 +1,4 @@ -package com.willfp.eco.core.config; +package com.willfp.eco.core.config.interfaces; import java.io.File; import java.io.IOException; diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/WrappedYamlConfiguration.java b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/WrappedYamlConfiguration.java new file mode 100644 index 00000000..6fa76725 --- /dev/null +++ b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/WrappedYamlConfiguration.java @@ -0,0 +1,12 @@ +package com.willfp.eco.core.config.interfaces; + +import org.bukkit.configuration.file.YamlConfiguration; + +public interface WrappedYamlConfiguration { + /** + * Get the ConfigurationSection handle. + * + * @return The handle. + */ + YamlConfiguration getBukkitHandle(); +} diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/json/JSONConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/json/JSONConfig.java index 559bc01f..afd5a049 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/json/JSONConfig.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/json/JSONConfig.java @@ -1,30 +1,20 @@ package com.willfp.eco.core.config.json; -import com.willfp.eco.core.config.Config; +import com.willfp.eco.core.Eco; +import com.willfp.eco.core.config.json.wrapper.JSONConfigWrapper; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import java.util.List; +import java.util.Map; -public interface JSONConfig extends Config { +public class JSONConfig extends JSONConfigWrapper { /** - * Get a list of subsections from config. + * Config implementation for passing maps. + *

+ * Does not automatically update. * - * @param path The key to fetch the value from. - * @return The found value, or a blank {@link java.util.ArrayList} if not found. + * @param values The map of values. */ - @NotNull - List getSubsections(@NotNull String path); - - /** - * Get a list of subsections from config. - * - * @param path The key to fetch the value from. - * @return The found value, or null if not found. - */ - @Nullable - List getSubsectionsOrNull(@NotNull String path); - - @Override - JSONConfig clone(); + public JSONConfig(@NotNull final Map values) { + super(Eco.getHandler().getConfigFactory().createJSONConfig(values)); + } } diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/json/JsonStaticBaseConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/json/JSONStaticBaseConfig.java similarity index 84% rename from eco-api/src/main/java/com/willfp/eco/core/config/json/JsonStaticBaseConfig.java rename to eco-api/src/main/java/com/willfp/eco/core/config/json/JSONStaticBaseConfig.java index 4fc337d8..04c60777 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/json/JsonStaticBaseConfig.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/json/JSONStaticBaseConfig.java @@ -5,7 +5,7 @@ import com.willfp.eco.core.EcoPlugin; import com.willfp.eco.core.config.json.wrapper.LoadableJSONConfigWrapper; import org.jetbrains.annotations.NotNull; -public abstract class JsonStaticBaseConfig extends LoadableJSONConfigWrapper { +public abstract class JSONStaticBaseConfig extends LoadableJSONConfigWrapper { /** * Config implementation for configs present in the plugin's base directory (eg config.json, lang.json). *

@@ -14,7 +14,7 @@ public abstract class JsonStaticBaseConfig extends LoadableJSONConfigWrapper { * @param configName The name of the config * @param plugin The plugin. */ - protected JsonStaticBaseConfig(@NotNull final String configName, + protected JSONStaticBaseConfig(@NotNull final String configName, @NotNull final EcoPlugin plugin) { super(Eco.getHandler().getConfigFactory().createLoadableJSONConfig(configName, plugin, "", plugin.getClass())); } diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/json/LoadableJSONConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/json/LoadableJSONConfig.java deleted file mode 100644 index ecb9f009..00000000 --- a/eco-api/src/main/java/com/willfp/eco/core/config/json/LoadableJSONConfig.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.willfp.eco.core.config.json; - -import com.willfp.eco.core.config.LoadableConfig; - -public interface LoadableJSONConfig extends JSONConfig, LoadableConfig { - -} diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/json/wrapper/JSONConfigWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/config/json/wrapper/JSONConfigWrapper.java index 6f30b025..4adb957d 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/json/wrapper/JSONConfigWrapper.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/json/wrapper/JSONConfigWrapper.java @@ -1,19 +1,19 @@ package com.willfp.eco.core.config.json.wrapper; -import com.willfp.eco.core.config.json.JSONConfig; +import com.willfp.eco.core.config.interfaces.JSONConfig; import com.willfp.eco.core.config.wrapper.ConfigWrapper; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.List; -public abstract class JSONConfigWrapper extends ConfigWrapper implements JSONConfig { +public abstract class JSONConfigWrapper extends ConfigWrapper implements JSONConfig { /** * Create a config wrapper. * * @param handle The handle. */ - public JSONConfigWrapper(@NotNull final T handle) { + protected JSONConfigWrapper(@NotNull final JSONConfig handle) { super(handle); } diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/json/wrapper/LoadableJSONConfigWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/config/json/wrapper/LoadableJSONConfigWrapper.java index 59e79e3d..91927159 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/json/wrapper/LoadableJSONConfigWrapper.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/json/wrapper/LoadableJSONConfigWrapper.java @@ -1,45 +1,48 @@ package com.willfp.eco.core.config.json.wrapper; -import com.willfp.eco.core.config.LoadableConfig; -import com.willfp.eco.core.config.json.LoadableJSONConfig; +import com.willfp.eco.core.config.interfaces.JSONConfig; +import com.willfp.eco.core.config.interfaces.LoadableConfig; +import org.apache.commons.lang.Validate; import org.jetbrains.annotations.NotNull; import java.io.File; import java.io.IOException; -public abstract class LoadableJSONConfigWrapper extends JSONConfigWrapper implements LoadableConfig { +public abstract class LoadableJSONConfigWrapper extends JSONConfigWrapper implements LoadableConfig { /** * Create a config wrapper. * * @param handle The handle. */ - public LoadableJSONConfigWrapper(@NotNull final LoadableJSONConfig handle) { + protected LoadableJSONConfigWrapper(@NotNull final JSONConfig handle) { super(handle); + + Validate.isTrue(handle instanceof LoadableConfig, "Wrapped config must be loadable!"); } @Override public void createFile() { - this.getHandle().createFile(); + ((LoadableConfig) this.getHandle()).createFile(); } @Override public String getResourcePath() { - return this.getHandle().getResourcePath(); + return ((LoadableConfig) this.getHandle()).getResourcePath(); } @Override public void save() throws IOException { - this.getHandle().save(); + ((LoadableConfig) this.getHandle()).save(); } @Override public File getConfigFile() { - return this.getHandle().getConfigFile(); + return ((LoadableConfig) this.getHandle()).getConfigFile(); } @Override public String getName() { - return this.getHandle().getName(); + return ((LoadableConfig) this.getHandle()).getName(); } } diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/updating/ConfigHandler.java b/eco-api/src/main/java/com/willfp/eco/core/config/updating/ConfigHandler.java index 7d2f5715..a736f53f 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/updating/ConfigHandler.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/updating/ConfigHandler.java @@ -1,6 +1,6 @@ package com.willfp.eco.core.config.updating; -import com.willfp.eco.core.config.LoadableConfig; +import com.willfp.eco.core.config.interfaces.LoadableConfig; import org.jetbrains.annotations.NotNull; public interface ConfigHandler { diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigFactory.java b/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigFactory.java index fd4b064f..9a567da2 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigFactory.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigFactory.java @@ -1,10 +1,8 @@ package com.willfp.eco.core.config.wrapper; import com.willfp.eco.core.EcoPlugin; -import com.willfp.eco.core.config.Config; -import com.willfp.eco.core.config.json.JSONConfig; -import com.willfp.eco.core.config.json.LoadableJSONConfig; -import com.willfp.eco.core.config.yaml.LoadableYamlConfig; +import com.willfp.eco.core.config.interfaces.Config; +import com.willfp.eco.core.config.interfaces.JSONConfig; import org.bukkit.configuration.file.YamlConfiguration; import org.jetbrains.annotations.NotNull; @@ -21,7 +19,7 @@ public interface ConfigFactory { * @param removeUnused Whether keys not present in the default config should be removed on update. * @param updateBlacklist Substring of keys to not add/remove keys for. */ - LoadableYamlConfig createUpdatableYamlConfig(@NotNull String configName, + Config createUpdatableYamlConfig(@NotNull String configName, @NotNull EcoPlugin plugin, @NotNull String subDirectoryPath, @NotNull Class source, @@ -36,7 +34,7 @@ public interface ConfigFactory { * @param subDirectoryPath The subdirectory path. * @param source The class that owns the resource. */ - LoadableJSONConfig createLoadableJSONConfig(@NotNull String configName, + JSONConfig createLoadableJSONConfig(@NotNull String configName, @NotNull EcoPlugin plugin, @NotNull String subDirectoryPath, @NotNull Class source); @@ -49,7 +47,7 @@ public interface ConfigFactory { * @param subDirectoryPath The subdirectory path. * @param source The class that owns the resource. */ - LoadableYamlConfig createLoadableYamlConfig(@NotNull String configName, + Config createLoadableYamlConfig(@NotNull String configName, @NotNull EcoPlugin plugin, @NotNull String subDirectoryPath, @NotNull Class source); diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigWrapper.java index 036d3e85..061e896f 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigWrapper.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigWrapper.java @@ -1,6 +1,6 @@ package com.willfp.eco.core.config.wrapper; -import com.willfp.eco.core.config.Config; +import com.willfp.eco.core.config.interfaces.Config; import lombok.Getter; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/LoadableYamlConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/yaml/LoadableYamlConfig.java deleted file mode 100644 index 232b5181..00000000 --- a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/LoadableYamlConfig.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.willfp.eco.core.config.yaml; - -import com.willfp.eco.core.config.Config; -import com.willfp.eco.core.config.LoadableConfig; - -public interface LoadableYamlConfig extends Config, LoadableConfig { - -} diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/YamlBaseConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/yaml/YamlBaseConfig.java index 9dc0f2cf..0e56e5bc 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/YamlBaseConfig.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/yaml/YamlBaseConfig.java @@ -6,7 +6,6 @@ import com.willfp.eco.core.config.yaml.wrapper.LoadableYamlConfigWrapper; import org.jetbrains.annotations.NotNull; public abstract class YamlBaseConfig extends LoadableYamlConfigWrapper { - /** * Config implementation for configs present in the plugin's base directory (eg config.yml, lang.yml). *

diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/YamlConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/yaml/YamlConfig.java index 42028b61..4245cc09 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/YamlConfig.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/yaml/YamlConfig.java @@ -1,14 +1,13 @@ package com.willfp.eco.core.config.yaml; import com.willfp.eco.core.Eco; -import com.willfp.eco.core.config.Config; import com.willfp.eco.core.config.yaml.wrapper.YamlConfigWrapper; import org.bukkit.configuration.file.YamlConfiguration; import org.jetbrains.annotations.NotNull; import java.io.StringReader; -public class YamlConfig extends YamlConfigWrapper { +public class YamlConfig extends YamlConfigWrapper { /** * Config implementation for passing YamlConfigurations. *

diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/LoadableYamlConfigWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/LoadableYamlConfigWrapper.java index a2b4ee88..2abb4928 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/LoadableYamlConfigWrapper.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/LoadableYamlConfigWrapper.java @@ -1,45 +1,48 @@ package com.willfp.eco.core.config.yaml.wrapper; -import com.willfp.eco.core.config.LoadableConfig; -import com.willfp.eco.core.config.yaml.LoadableYamlConfig; +import com.willfp.eco.core.config.interfaces.Config; +import com.willfp.eco.core.config.interfaces.LoadableConfig; +import org.apache.commons.lang.Validate; import org.jetbrains.annotations.NotNull; import java.io.File; import java.io.IOException; -public abstract class LoadableYamlConfigWrapper extends YamlConfigWrapper implements LoadableConfig { +public abstract class LoadableYamlConfigWrapper extends YamlConfigWrapper implements LoadableConfig { /** * Create a config wrapper. * * @param handle The handle. */ - public LoadableYamlConfigWrapper(@NotNull final LoadableYamlConfig handle) { + protected LoadableYamlConfigWrapper(@NotNull final Config handle) { super(handle); + + Validate.isTrue(handle instanceof LoadableConfig, "Wrapped config must be loadable!"); } @Override public void createFile() { - this.getHandle().createFile(); + ((LoadableConfig) this.getHandle()).createFile(); } @Override public String getResourcePath() { - return this.getHandle().getResourcePath(); + return ((LoadableConfig) this.getHandle()).getResourcePath(); } @Override public void save() throws IOException { - this.getHandle().save(); + ((LoadableConfig) this.getHandle()).save(); } @Override public File getConfigFile() { - return this.getHandle().getConfigFile(); + return ((LoadableConfig) this.getHandle()).getConfigFile(); } @Override public String getName() { - return this.getHandle().getName(); + return ((LoadableConfig) this.getHandle()).getName(); } } diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/WrappedYamlBukkitConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/WrappedYamlBukkitConfig.java deleted file mode 100644 index c1153167..00000000 --- a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/WrappedYamlBukkitConfig.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.willfp.eco.core.config.yaml.wrapper; - -import org.bukkit.configuration.ConfigurationSection; - -public interface WrappedYamlBukkitConfig { - /** - * Get the ConfigurationSection handle. - * - * @return The handle. - */ - T getBukkitHandle(); -} diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/YamlConfigWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/YamlConfigWrapper.java index 738b7b45..5e011ebe 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/YamlConfigWrapper.java +++ b/eco-api/src/main/java/com/willfp/eco/core/config/yaml/wrapper/YamlConfigWrapper.java @@ -1,23 +1,24 @@ package com.willfp.eco.core.config.yaml.wrapper; -import com.willfp.eco.core.config.Config; +import com.willfp.eco.core.config.interfaces.Config; +import com.willfp.eco.core.config.interfaces.WrappedYamlConfiguration; import com.willfp.eco.core.config.wrapper.ConfigWrapper; import org.bukkit.configuration.file.YamlConfiguration; import org.jetbrains.annotations.NotNull; -public abstract class YamlConfigWrapper extends ConfigWrapper implements WrappedYamlBukkitConfig { +public abstract class YamlConfigWrapper extends ConfigWrapper implements WrappedYamlConfiguration { /** * Create a config wrapper. * * @param handle The handle. */ - public YamlConfigWrapper(@NotNull final T handle) { + protected YamlConfigWrapper(@NotNull final Config handle) { super(handle); } @Override public YamlConfiguration getBukkitHandle() { - return (YamlConfiguration) ((WrappedYamlBukkitConfig) this.getHandle()).getBukkitHandle(); + return ((WrappedYamlConfiguration) this.getHandle()).getBukkitHandle(); } } diff --git a/eco-api/src/main/java/com/willfp/eco/core/data/Data.java b/eco-api/src/main/java/com/willfp/eco/core/data/Data.java index 1ead7ec9..ce8a16fd 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/data/Data.java +++ b/eco-api/src/main/java/com/willfp/eco/core/data/Data.java @@ -2,10 +2,10 @@ package com.willfp.eco.core.data; import com.willfp.eco.core.Eco; import com.willfp.eco.core.EcoPlugin; -import com.willfp.eco.core.config.Config; -import com.willfp.eco.core.config.json.JSONConfig; -import com.willfp.eco.core.config.json.JsonStaticBaseConfig; -import com.willfp.eco.core.config.LoadableConfig; +import com.willfp.eco.core.config.interfaces.Config; +import com.willfp.eco.core.config.interfaces.JSONConfig; +import com.willfp.eco.core.config.json.JSONStaticBaseConfig; +import com.willfp.eco.core.config.interfaces.LoadableConfig; import lombok.experimental.UtilityClass; import org.bukkit.OfflinePlayer; import org.jetbrains.annotations.ApiStatus; @@ -34,7 +34,7 @@ public class Data { * @param config data.json. */ @ApiStatus.Internal - public void init(@NotNull final JsonStaticBaseConfig config) { + public void init(@NotNull final JSONStaticBaseConfig config) { datafile = config; } diff --git a/eco-core/core-backend/build.gradle b/eco-core/core-backend/build.gradle index d08f07f0..59279308 100644 --- a/eco-core/core-backend/build.gradle +++ b/eco-core/core-backend/build.gradle @@ -2,5 +2,6 @@ group 'com.willfp' version rootProject.version dependencies { - compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT' + compileOnly 'org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT' + compileOnly 'me.clip:placeholderapi:2.10.9' } \ No newline at end of file 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 2fc647b2..b016cef6 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 @@ -1,14 +1,14 @@ package com.willfp.eco.internal.config; import com.willfp.eco.core.EcoPlugin; -import com.willfp.eco.core.config.Config; -import com.willfp.eco.core.config.json.JSONConfig; +import com.willfp.eco.core.config.interfaces.Config; +import com.willfp.eco.core.config.interfaces.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.yaml.LoadableYamlConfig; -import com.willfp.eco.internal.config.yaml.UpdatableYamlConfig; -import com.willfp.eco.internal.config.yaml.YamlConfigSection; +import com.willfp.eco.internal.config.json.EcoJSONConfigSection; +import com.willfp.eco.internal.config.json.EcoLoadableJSONConfig; +import com.willfp.eco.internal.config.yaml.EcoLoadableYamlConfig; +import com.willfp.eco.internal.config.yaml.EcoUpdatableYamlConfig; +import com.willfp.eco.internal.config.yaml.EcoYamlConfigSection; import org.bukkit.configuration.file.YamlConfiguration; import org.jetbrains.annotations.NotNull; @@ -16,13 +16,13 @@ import java.util.Map; public class EcoConfigFactory implements ConfigFactory { @Override - public com.willfp.eco.core.config.yaml.LoadableYamlConfig createUpdatableYamlConfig(@NotNull final String configName, - @NotNull final EcoPlugin plugin, - @NotNull final String subDirectoryPath, - @NotNull final Class source, - final boolean removeUnused, - @NotNull final String... updateBlacklist) { - return new UpdatableYamlConfig( + public Config createUpdatableYamlConfig(@NotNull final String configName, + @NotNull final EcoPlugin plugin, + @NotNull final String subDirectoryPath, + @NotNull final Class source, + final boolean removeUnused, + @NotNull final String... updateBlacklist) { + return new EcoUpdatableYamlConfig( configName, plugin, subDirectoryPath, @@ -33,11 +33,11 @@ public class EcoConfigFactory implements ConfigFactory { } @Override - public com.willfp.eco.core.config.json.LoadableJSONConfig createLoadableJSONConfig(@NotNull final String configName, - @NotNull final EcoPlugin plugin, - @NotNull final String subDirectoryPath, - @NotNull final Class source) { - return new LoadableJSONConfig( + public JSONConfig createLoadableJSONConfig(@NotNull final String configName, + @NotNull final EcoPlugin plugin, + @NotNull final String subDirectoryPath, + @NotNull final Class source) { + return new EcoLoadableJSONConfig( configName, plugin, subDirectoryPath, @@ -46,11 +46,11 @@ public class EcoConfigFactory implements ConfigFactory { } @Override - public com.willfp.eco.core.config.yaml.LoadableYamlConfig createLoadableYamlConfig(@NotNull final String configName, - @NotNull final EcoPlugin plugin, - @NotNull final String subDirectoryPath, - @NotNull final Class source) { - return new LoadableYamlConfig( + public Config createLoadableYamlConfig(@NotNull final String configName, + @NotNull final EcoPlugin plugin, + @NotNull final String subDirectoryPath, + @NotNull final Class source) { + return new EcoLoadableYamlConfig( configName, plugin, subDirectoryPath, @@ -60,11 +60,11 @@ public class EcoConfigFactory implements ConfigFactory { @Override public Config createYamlConfig(@NotNull final YamlConfiguration config) { - return new YamlConfigSection(config); + return new EcoYamlConfigSection(config); } @Override public JSONConfig createJSONConfig(@NotNull final Map values) { - return new JSONConfigSection(values); + return new EcoJSONConfigSection(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/EcoJSONConfigSection.java similarity index 61% 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/EcoJSONConfigSection.java index df72eb65..827728cc 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/EcoJSONConfigSection.java @@ -4,13 +4,13 @@ import org.jetbrains.annotations.NotNull; import java.util.Map; -public class JSONConfigSection extends JSONConfigWrapper { +public class EcoJSONConfigSection extends EcoJSONConfigWrapper { /** * Config section. * * @param values The values. */ - public JSONConfigSection(@NotNull final Map values) { + public EcoJSONConfigSection(@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/EcoJSONConfigWrapper.java similarity index 92% 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/EcoJSONConfigWrapper.java index 76cb3533..478d74d6 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/EcoJSONConfigWrapper.java @@ -2,8 +2,8 @@ package com.willfp.eco.internal.config.json; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.willfp.eco.core.config.Config; -import com.willfp.eco.core.config.json.JSONConfig; +import com.willfp.eco.core.config.interfaces.Config; +import com.willfp.eco.core.config.interfaces.JSONConfig; import com.willfp.eco.util.StringUtils; import lombok.Getter; import org.apache.commons.lang.Validate; @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Set; @SuppressWarnings({"unchecked", "unused"}) -public class JSONConfigWrapper implements JSONConfig { +public class EcoJSONConfigWrapper implements JSONConfig { /** * The linked {@link ConfigurationSection} where values are physically stored. */ @@ -42,7 +42,7 @@ public class JSONConfigWrapper implements JSONConfig { /** * Abstract config. */ - public JSONConfigWrapper() { + public EcoJSONConfigWrapper() { } @@ -88,7 +88,7 @@ public class JSONConfigWrapper implements JSONConfig { } if (values.get(closestPath) instanceof Map && !path.equals(closestPath)) { - JSONConfigSection section = new JSONConfigSection((Map) values.get(closestPath)); + EcoJSONConfigSection section = new EcoJSONConfigSection((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 { list.add(root + key); if (values.get(key) instanceof Map) { - JSONConfigSection section = new JSONConfigSection((Map) values.get(key)); + EcoJSONConfigSection section = new EcoJSONConfigSection((Map) values.get(key)); list.addAll(section.getDeepKeys(list, root + key + ".")); } } @@ -147,14 +147,14 @@ public class JSONConfigWrapper implements JSONConfig { } if (values.get(closestPath) instanceof Map && !path.equals(closestPath)) { - JSONConfigSection section = new JSONConfigSection((Map) values.get(closestPath)); + EcoJSONConfigSection section = new EcoJSONConfigSection((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 = ((EcoJSONConfigWrapper) object).getValues(); } values.put(path, obj); @@ -174,7 +174,7 @@ public class JSONConfigWrapper implements JSONConfig { public Config getSubsectionOrNull(@NotNull final String path) { if (values.containsKey(path)) { Map subsection = (Map) values.get(path); - return new JSONConfigSection(subsection); + return new EcoJSONConfigSection(subsection); } else { return null; } @@ -200,7 +200,7 @@ public class JSONConfigWrapper implements JSONConfig { List configs = new ArrayList<>(); for (Map map : maps) { - configs.add(new JSONConfigSection(map)); + configs.add(new EcoJSONConfigSection(map)); } return configs; @@ -349,6 +349,6 @@ public class JSONConfigWrapper implements JSONConfig { @Override public JSONConfig clone() { - return new JSONConfigSection(new HashMap<>(this.getValues())); + return new EcoJSONConfigSection(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/EcoLoadableJSONConfig.java similarity index 90% 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/EcoLoadableJSONConfig.java index a46e2c07..d5421f5b 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/EcoLoadableJSONConfig.java @@ -1,6 +1,7 @@ package com.willfp.eco.internal.config.json; import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.config.interfaces.LoadableConfig; import lombok.AccessLevel; import lombok.Getter; import org.jetbrains.annotations.NotNull; @@ -17,7 +18,7 @@ import java.nio.file.StandardOpenOption; import java.util.HashMap; @SuppressWarnings({"unchecked", "unused"}) -public class LoadableJSONConfig extends JSONConfigWrapper implements com.willfp.eco.core.config.json.LoadableJSONConfig { +public class EcoLoadableJSONConfig extends EcoJSONConfigWrapper implements LoadableConfig { /** * The physical config file, as stored on disk. */ @@ -56,10 +57,10 @@ public class LoadableJSONConfig extends JSONConfigWrapper implements com.willfp. * @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 EcoLoadableJSONConfig(@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; diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/updating/EcoConfigHandler.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/updating/EcoConfigHandler.java index c836a753..966b73aa 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/updating/EcoConfigHandler.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/updating/EcoConfigHandler.java @@ -4,10 +4,10 @@ import com.willfp.eco.core.EcoPlugin; import com.willfp.eco.core.PluginDependent; import com.willfp.eco.core.config.updating.ConfigHandler; import com.willfp.eco.core.config.updating.ConfigUpdater; -import com.willfp.eco.core.config.LoadableConfig; +import com.willfp.eco.core.config.interfaces.LoadableConfig; import com.willfp.eco.internal.config.updating.exceptions.InvalidUpdatableClassException; import com.willfp.eco.internal.config.updating.exceptions.InvalidUpdateMethodException; -import com.willfp.eco.internal.config.yaml.UpdatableYamlConfig; +import com.willfp.eco.internal.config.yaml.EcoUpdatableYamlConfig; import org.jetbrains.annotations.NotNull; import java.io.IOException; @@ -100,7 +100,7 @@ public class EcoConfigHandler extends PluginDependent implements Conf @Override public void updateConfigs() { for (LoadableConfig config : configs) { - if (config instanceof UpdatableYamlConfig updatableYamlConfig) { + if (config instanceof EcoUpdatableYamlConfig updatableYamlConfig) { updatableYamlConfig.update(); } } diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/LoadableYamlConfig.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoLoadableYamlConfig.java similarity index 91% rename from eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/LoadableYamlConfig.java rename to eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoLoadableYamlConfig.java index 75612bb0..7591ac76 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/LoadableYamlConfig.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoLoadableYamlConfig.java @@ -1,7 +1,8 @@ package com.willfp.eco.internal.config.yaml; import com.willfp.eco.core.EcoPlugin; -import com.willfp.eco.core.config.yaml.wrapper.WrappedYamlBukkitConfig; +import com.willfp.eco.core.config.interfaces.LoadableConfig; +import com.willfp.eco.core.config.interfaces.WrappedYamlConfiguration; import lombok.AccessLevel; import lombok.Getter; import org.bukkit.configuration.file.YamlConfiguration; @@ -13,7 +14,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -public class LoadableYamlConfig extends YamlConfigWrapper implements com.willfp.eco.core.config.yaml.LoadableYamlConfig, WrappedYamlBukkitConfig { +public class EcoLoadableYamlConfig extends EcoYamlConfigWrapper implements WrappedYamlConfiguration, LoadableConfig { /** * The physical config file, as stored on disk. */ @@ -52,7 +53,7 @@ public class LoadableYamlConfig extends YamlConfigWrapper imp * @param subDirectoryPath The subdirectory path. * @param source The class that owns the resource. */ - public LoadableYamlConfig(@NotNull final String configName, + public EcoLoadableYamlConfig(@NotNull final String configName, @NotNull final EcoPlugin plugin, @NotNull final String subDirectoryPath, @NotNull final Class source) { diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/UpdatableYamlConfig.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoUpdatableYamlConfig.java similarity index 96% rename from eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/UpdatableYamlConfig.java rename to eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoUpdatableYamlConfig.java index 8d8bccc3..c824bc3a 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/UpdatableYamlConfig.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoUpdatableYamlConfig.java @@ -14,7 +14,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -public class UpdatableYamlConfig extends LoadableYamlConfig { +public class EcoUpdatableYamlConfig extends EcoLoadableYamlConfig { /** * Whether keys not in the base config should be removed on update. */ @@ -35,7 +35,7 @@ public class UpdatableYamlConfig extends LoadableYamlConfig { * @param removeUnused Whether keys not present in the default config should be removed on update. * @param updateBlacklist Substring of keys to not add/remove keys for. */ - public UpdatableYamlConfig(@NotNull final String configName, + public EcoUpdatableYamlConfig(@NotNull final String configName, @NotNull final EcoPlugin plugin, @NotNull final String subDirectoryPath, @NotNull final Class source, diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/YamlConfigSection.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoYamlConfigSection.java similarity index 61% rename from eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/YamlConfigSection.java rename to eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoYamlConfigSection.java index b4f19f67..90c25a57 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/YamlConfigSection.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoYamlConfigSection.java @@ -3,13 +3,13 @@ package com.willfp.eco.internal.config.yaml; import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; -public class YamlConfigSection extends YamlConfigWrapper { +public class EcoYamlConfigSection extends EcoYamlConfigWrapper { /** * Config section. * * @param section The section. */ - public YamlConfigSection(@NotNull final ConfigurationSection section) { + public EcoYamlConfigSection(@NotNull final ConfigurationSection section) { this.init(section); } } diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/YamlConfigWrapper.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoYamlConfigWrapper.java similarity index 93% rename from eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/YamlConfigWrapper.java rename to eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoYamlConfigWrapper.java index aaf05d86..fddf1386 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/YamlConfigWrapper.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/config/yaml/EcoYamlConfigWrapper.java @@ -1,7 +1,6 @@ package com.willfp.eco.internal.config.yaml; -import com.willfp.eco.core.config.Config; -import com.willfp.eco.core.config.yaml.wrapper.WrappedYamlBukkitConfig; +import com.willfp.eco.core.config.interfaces.Config; import com.willfp.eco.util.StringUtils; import lombok.Getter; import org.apache.commons.lang.Validate; @@ -18,7 +17,7 @@ import java.util.Map; import java.util.Objects; @SuppressWarnings({"unchecked", "unused"}) -public class YamlConfigWrapper implements Config, WrappedYamlBukkitConfig { +public class EcoYamlConfigWrapper implements Config { /** * The linked {@link ConfigurationSection} where values are physically stored. */ @@ -33,7 +32,7 @@ public class YamlConfigWrapper implements Config /** * Abstract config. */ - public YamlConfigWrapper() { + public EcoYamlConfigWrapper() { } @@ -98,7 +97,7 @@ public class YamlConfigWrapper implements Config if (raw == null) { cache.put(path, null); } else { - cache.put(path, new YamlConfigSection(raw)); + cache.put(path, new EcoYamlConfigSection(raw)); } return getSubsectionOrNull(path); } @@ -289,11 +288,6 @@ public class YamlConfigWrapper implements Config @Override public Config clone() { - return new YamlConfigSection(YamlConfiguration.loadConfiguration(new StringReader(this.toPlaintext()))); - } - - @Override - public T getBukkitHandle() { - return handle; + return new EcoYamlConfigSection(YamlConfiguration.loadConfiguration(new StringReader(this.toPlaintext()))); } } diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/drops/DropManager.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/drops/DropManager.java index 25648f63..ff6b89be 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/drops/DropManager.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/drops/DropManager.java @@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull; @UtilityClass public final class DropManager { /** - * The currently used type, or implementation, of {@link AbstractDropQueue}. + * The currently used type, or implementation, of {@link com.willfp.eco.core.drops.DropQueue}. *

* Default is {@link DropQueueType#COLLATED}, however this can be changed. */ diff --git a/eco-core/core-plugin/build.gradle b/eco-core/core-plugin/build.gradle index 6c39f6a6..9c0826d6 100644 --- a/eco-core/core-plugin/build.gradle +++ b/eco-core/core-plugin/build.gradle @@ -5,7 +5,7 @@ dependencies { implementation 'org.apache.maven:maven-artifact:3.0.3' implementation 'org.bstats:bstats-bukkit:1.7' compileOnly 'com.google.code.gson:gson:2.8.7' - compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT' + compileOnly 'org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT' compileOnly project(":eco-core:core-proxy") compileOnly project(":eco-core:core-backend") compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.0-SNAPSHOT' diff --git a/eco-core/core-plugin/src/main/java/com/willfp/eco/spigot/config/DataJson.java b/eco-core/core-plugin/src/main/java/com/willfp/eco/spigot/config/DataJson.java index d265acac..da930f71 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/eco/spigot/config/DataJson.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/eco/spigot/config/DataJson.java @@ -1,10 +1,10 @@ package com.willfp.eco.spigot.config; -import com.willfp.eco.core.config.json.JsonStaticBaseConfig; +import com.willfp.eco.core.config.json.JSONStaticBaseConfig; import com.willfp.eco.spigot.EcoSpigotPlugin; import org.jetbrains.annotations.NotNull; -public class DataJson extends JsonStaticBaseConfig { +public class DataJson extends JSONStaticBaseConfig { /** * Init data.json. *