Deprecation changes and warnings

This commit is contained in:
Auxilor
2021-12-12 15:47:46 +00:00
parent b945a3f948
commit dab26cbe95
20 changed files with 48 additions and 16 deletions

View File

@@ -16,7 +16,7 @@ import java.util.List;
* update to use the new system.
*/
@FunctionalInterface
@Deprecated(forRemoval = true)
@Deprecated
public interface CommandHandler {
/**
* The code to be called on execution.

View File

@@ -16,7 +16,7 @@ import java.util.List;
* update to use the new system.
*/
@FunctionalInterface
@Deprecated(forRemoval = true)
@Deprecated
public interface TabCompleteHandler {
/**
* Handle Tab Completion.

View File

@@ -12,7 +12,7 @@ import java.util.List;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
@SuppressWarnings("DeprecatedIsStillUsed")
public interface JSONConfig extends Config {
/**

View File

@@ -9,7 +9,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
@SuppressWarnings("DeprecatedIsStillUsed")
public interface WrappedYamlConfiguration {
/**

View File

@@ -17,7 +17,7 @@ import org.jetbrains.annotations.NotNull;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public abstract class JSONBaseConfig extends LoadableJSONConfigWrapper {
/**
* @param configName The name of the config

View File

@@ -21,7 +21,7 @@ import org.jetbrains.annotations.NotNull;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public abstract class JSONExtendableConfig extends LoadableJSONConfigWrapper {
/**
* @param configName The name of the config

View File

@@ -15,7 +15,7 @@ import org.jetbrains.annotations.NotNull;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public abstract class JSONStaticBaseConfig extends LoadableJSONConfigWrapper {
/**
* Config implementation for configs present in the plugin's base directory (eg config.json, lang.json).

View File

@@ -15,7 +15,7 @@ import java.util.Map;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public class JSONTransientConfig extends JSONConfigWrapper {
/**
* Config implementation for passing maps.

View File

@@ -14,7 +14,7 @@ import java.util.List;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public abstract class JSONConfigWrapper extends ConfigWrapper<JSONConfig> implements JSONConfig {
/**
* Create a config wrapper.

View File

@@ -17,7 +17,7 @@ import java.io.IOException;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public abstract class LoadableJSONConfigWrapper extends JSONConfigWrapper implements LoadableConfig {
/**
* Create a config wrapper.

View File

@@ -16,7 +16,7 @@ import org.jetbrains.annotations.NotNull;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public abstract class YamlBaseConfig extends LoadableYamlConfigWrapper {
/**
* @param configName The name of the config

View File

@@ -20,7 +20,7 @@ import org.jetbrains.annotations.NotNull;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public abstract class YamlExtendableConfig extends LoadableYamlConfigWrapper {
/**
* @param configName The name of the config

View File

@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public abstract class YamlStaticBaseConfig extends LoadableYamlConfigWrapper {
/**
* Config implementation for configs present in the plugin's base directory (eg config.yml, lang.yml).

View File

@@ -17,7 +17,7 @@ import java.io.StringReader;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public class YamlTransientConfig extends YamlConfigWrapper {
/**
* @param config The YamlConfiguration handle.

View File

@@ -17,7 +17,7 @@ import java.io.IOException;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public abstract class LoadableYamlConfigWrapper extends YamlConfigWrapper implements LoadableConfig {
/**
* Create a config wrapper.

View File

@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
* eg {@link com.willfp.eco.core.config.TransientConfig}, {@link com.willfp.eco.core.config.BaseConfig}.
* These configs will be removed eventually.
*/
@Deprecated(forRemoval = true)
@Deprecated
public abstract class YamlConfigWrapper extends ConfigWrapper<Config> implements WrappedYamlConfiguration {
/**
* Create a config wrapper.

View File

@@ -1,5 +1,6 @@
package com.willfp.eco.core.items.args;
import org.bukkit.Bukkit;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.jetbrains.annotations.NotNull;
@@ -14,6 +15,13 @@ import java.util.function.Predicate;
*/
@Deprecated(forRemoval = true)
public class ColorArgParser implements LookupArgParser {
/**
* Instantiate arg parser.
*/
public ColorArgParser() {
Bukkit.getLogger().severe("Instantiation of class marked for removal! (" + this.getClass().getName() + ")");
}
@Override
public @Nullable Predicate<ItemStack> parseArguments(@NotNull final String[] args,
@NotNull final ItemMeta meta) {

View File

@@ -1,5 +1,6 @@
package com.willfp.eco.core.items.args;
import org.bukkit.Bukkit;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.jetbrains.annotations.NotNull;
@@ -14,6 +15,13 @@ import java.util.function.Predicate;
*/
@Deprecated(forRemoval = true)
public class CustomModelDataArgParser implements LookupArgParser {
/**
* Instantiate arg parser.
*/
public CustomModelDataArgParser() {
Bukkit.getLogger().severe("Instantiation of class marked for removal! (" + this.getClass().getName() + ")");
}
@Override
public @Nullable Predicate<ItemStack> parseArguments(@NotNull final String[] args,
@NotNull final ItemMeta meta) {

View File

@@ -1,5 +1,6 @@
package com.willfp.eco.core.items.args;
import org.bukkit.Bukkit;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.jetbrains.annotations.NotNull;
@@ -14,6 +15,13 @@ import java.util.function.Predicate;
*/
@Deprecated(forRemoval = true)
public class EnchantmentArgParser implements LookupArgParser {
/**
* Instantiate arg parser.
*/
public EnchantmentArgParser() {
Bukkit.getLogger().severe("Instantiation of class marked for removal! (" + this.getClass().getName() + ")");
}
@Override
public @Nullable Predicate<ItemStack> parseArguments(@NotNull final String[] args,
@NotNull final ItemMeta meta) {

View File

@@ -1,5 +1,6 @@
package com.willfp.eco.core.items.args;
import org.bukkit.Bukkit;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.jetbrains.annotations.NotNull;
@@ -14,6 +15,13 @@ import java.util.function.Predicate;
*/
@Deprecated(forRemoval = true)
public class TextureArgParser implements LookupArgParser {
/**
* Instantiate arg parser.
*/
public TextureArgParser() {
Bukkit.getLogger().severe("Instantiation of class marked for removal! (" + this.getClass().getName() + ")");
}
@Override
public @Nullable Predicate<ItemStack> parseArguments(@NotNull final String[] args,
@NotNull final ItemMeta meta) {