diff --git a/eco-api/src/main/java/com/willfp/eco/core/Prerequisite.java b/eco-api/src/main/java/com/willfp/eco/core/Prerequisite.java index 1006138a..97d78f63 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/Prerequisite.java +++ b/eco-api/src/main/java/com/willfp/eco/core/Prerequisite.java @@ -35,7 +35,7 @@ public class Prerequisite { * * @deprecated Use {@link EconomyManager#hasRegistrations()} instead. */ - @Deprecated + @Deprecated(forRemoval = true) public static final Prerequisite HAS_VAULT = new Prerequisite( () -> ClassUtils.exists("net.milkbowl.vault.economy.Economy"), "Requires server to have vault" @@ -54,7 +54,7 @@ public class Prerequisite { * * @deprecated eco no longer supports versions before 1.17. */ - @Deprecated(since = "6.25.2") + @Deprecated(since = "6.25.2", forRemoval = true) public static final Prerequisite HAS_1_17 = new Prerequisite( () -> ProxyConstants.NMS_VERSION.contains("17") || HAS_1_18.isMet(), "Requires server to be running 1.17+" diff --git a/eco-api/src/main/java/com/willfp/eco/core/command/CommandBase.java b/eco-api/src/main/java/com/willfp/eco/core/command/CommandBase.java index 6d07db59..787e79c7 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/command/CommandBase.java +++ b/eco-api/src/main/java/com/willfp/eco/core/command/CommandBase.java @@ -10,6 +10,7 @@ import java.util.List; /** * Interface for all command implementations. */ +@SuppressWarnings("removal") public interface CommandBase { /** * Get command name. @@ -81,7 +82,7 @@ public interface CommandBase { * @see CommandHandler * @deprecated Use {@link CommandBase#onExecute(CommandSender, List)} instead. */ - @Deprecated + @Deprecated(forRemoval = true) CommandHandler getHandler(); /** @@ -91,7 +92,7 @@ public interface CommandBase { * @see CommandHandler * @deprecated Handlers have been deprecated. */ - @Deprecated + @Deprecated(forRemoval = true) void setHandler(@NotNull CommandHandler handler); /** @@ -101,7 +102,7 @@ public interface CommandBase { * @see TabCompleteHandler * @deprecated Use {@link CommandBase#tabComplete(CommandSender, List)} instead. */ - @Deprecated + @Deprecated(forRemoval = true) TabCompleteHandler getTabCompleter(); /** @@ -111,6 +112,6 @@ public interface CommandBase { * @see TabCompleteHandler * @deprecated Handlers have been deprecated. */ - @Deprecated + @Deprecated(forRemoval = true) void setTabCompleter(@NotNull TabCompleteHandler handler); } diff --git a/eco-api/src/main/java/com/willfp/eco/core/command/CommandHandler.java b/eco-api/src/main/java/com/willfp/eco/core/command/CommandHandler.java index 6b28a91c..3fe44287 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/command/CommandHandler.java +++ b/eco-api/src/main/java/com/willfp/eco/core/command/CommandHandler.java @@ -16,7 +16,7 @@ import java.util.List; * update to use the new system: {@link CommandBase#onExecute(CommandSender, List)}. */ @FunctionalInterface -@Deprecated(since = "6.17.0") +@Deprecated(since = "6.17.0", forRemoval = true) public interface CommandHandler { /** * The code to be called on execution. diff --git a/eco-api/src/main/java/com/willfp/eco/core/command/TabCompleteHandler.java b/eco-api/src/main/java/com/willfp/eco/core/command/TabCompleteHandler.java index 85bcbbe9..44ca3cb8 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/command/TabCompleteHandler.java +++ b/eco-api/src/main/java/com/willfp/eco/core/command/TabCompleteHandler.java @@ -16,7 +16,7 @@ import java.util.List; * update to use the new system: {@link CommandBase#tabComplete(CommandSender, List)} */ @FunctionalInterface -@Deprecated(since = "6.17.0") +@Deprecated(since = "6.17.0", forRemoval = true) public interface TabCompleteHandler { /** * Handle Tab Completion. diff --git a/eco-api/src/main/java/com/willfp/eco/core/command/impl/HandledCommand.java b/eco-api/src/main/java/com/willfp/eco/core/command/impl/HandledCommand.java index 563baa33..8c3d1e0d 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/command/impl/HandledCommand.java +++ b/eco-api/src/main/java/com/willfp/eco/core/command/impl/HandledCommand.java @@ -2,8 +2,6 @@ package com.willfp.eco.core.command.impl; import com.willfp.eco.core.EcoPlugin; import com.willfp.eco.core.command.CommandBase; -import com.willfp.eco.core.command.CommandHandler; -import com.willfp.eco.core.command.TabCompleteHandler; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.util.StringUtil; @@ -23,7 +21,7 @@ import java.util.stream.Collectors; * in order to execute the command-specific code. It's essentially an internal * layer, hence why it's a package-private class. */ -@SuppressWarnings({"DeprecatedIsStillUsed"}) +@SuppressWarnings({"DeprecatedIsStillUsed", "removal"}) abstract class HandledCommand implements CommandBase { /** * The plugin. @@ -54,14 +52,14 @@ abstract class HandledCommand implements CommandBase { */ @Deprecated @Nullable - private CommandHandler handler = null; + private com.willfp.eco.core.command.CommandHandler handler = null; /** * The tab completion code to be executed in the command. */ @Deprecated @Nullable - private TabCompleteHandler tabCompleter = null; + private com.willfp.eco.core.command.TabCompleteHandler tabCompleter = null; /** * All subcommands for the command. @@ -256,27 +254,27 @@ abstract class HandledCommand implements CommandBase { return this.subcommands; } - @Deprecated + @Deprecated(forRemoval = true) @Override - public @Nullable CommandHandler getHandler() { + public @Nullable com.willfp.eco.core.command.CommandHandler getHandler() { return this.handler; } - @Deprecated + @Deprecated(forRemoval = true) @Override - public @Nullable TabCompleteHandler getTabCompleter() { + public @Nullable com.willfp.eco.core.command.TabCompleteHandler getTabCompleter() { return this.tabCompleter; } - @Deprecated + @Deprecated(forRemoval = true) @Override - public void setHandler(@Nullable final CommandHandler handler) { + public void setHandler(@Nullable final com.willfp.eco.core.command.CommandHandler handler) { this.handler = handler; } - @Deprecated + @Deprecated(forRemoval = true) @Override - public void setTabCompleter(@Nullable final TabCompleteHandler tabCompleter) { + public void setTabCompleter(@Nullable final com.willfp.eco.core.command.TabCompleteHandler tabCompleter) { this.tabCompleter = tabCompleter; } } diff --git a/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java b/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java index 915c16d1..617866b2 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java +++ b/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java @@ -24,7 +24,7 @@ public interface FastItemStack { * @return A map of all enchantments. * @deprecated Poorly named method. Use getEnchants instead. */ - @Deprecated(since = "6.24.0") + @Deprecated(since = "6.24.0", forRemoval = true) default Map getEnchantmentsOnItem(boolean checkStored) { return getEnchants(checkStored); } diff --git a/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/ProxyError.java b/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/ProxyError.java index 8741769f..122f24eb 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/ProxyError.java +++ b/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/ProxyError.java @@ -23,7 +23,7 @@ public class ProxyError extends Error { * @param message The message to send. * @deprecated Proxy Errors should include a cause. */ - @Deprecated + @Deprecated(forRemoval = true) public ProxyError(@NotNull final String message) { super(message); } diff --git a/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/UnsupportedVersionException.java b/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/UnsupportedVersionException.java index 697483cd..1ea1d89c 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/UnsupportedVersionException.java +++ b/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/UnsupportedVersionException.java @@ -8,6 +8,7 @@ import org.jetbrains.annotations.NotNull; * * @deprecated Poorly named, exception when it's actually an error, contains doubly nested errors. */ +@SuppressWarnings("removal") @Deprecated(since = "6.24.0", forRemoval = true) public class UnsupportedVersionException extends ProxyError { /** @@ -16,7 +17,7 @@ public class UnsupportedVersionException extends ProxyError { * @param message The message to send. * @deprecated Use the default constructor. */ - @Deprecated(since = "6.24.0") + @Deprecated(since = "6.24.0", forRemoval = true) public UnsupportedVersionException(@NotNull final String message) { super(message); } diff --git a/eco-api/src/main/java/com/willfp/eco/util/DurabilityUtils.java b/eco-api/src/main/java/com/willfp/eco/util/DurabilityUtils.java index 9a23fd11..cb24a35e 100644 --- a/eco-api/src/main/java/com/willfp/eco/util/DurabilityUtils.java +++ b/eco-api/src/main/java/com/willfp/eco/util/DurabilityUtils.java @@ -28,7 +28,7 @@ public final class DurabilityUtils { * @param slot The slot in the inventory of the item. * @deprecated The slot is not required. */ - @Deprecated(since = "6.24.0") + @Deprecated(since = "6.24.0", forRemoval = true) public static void damageItem(@NotNull final Player player, @NotNull final ItemStack item, final int damage, diff --git a/eco-api/src/main/java/com/willfp/eco/util/NumberUtils.java b/eco-api/src/main/java/com/willfp/eco/util/NumberUtils.java index 5bd4814a..cea2265b 100644 --- a/eco-api/src/main/java/com/willfp/eco/util/NumberUtils.java +++ b/eco-api/src/main/java/com/willfp/eco/util/NumberUtils.java @@ -110,7 +110,7 @@ public final class NumberUtils { * @return The new value. * @deprecated Pointless method. */ - @Deprecated(since = "6.19.0") + @Deprecated(since = "6.19.0", forRemoval = true) public static double equalIfOver(final double toChange, final double limit) { return Math.min(toChange, limit); diff --git a/eco-api/src/main/java/com/willfp/eco/util/TeamUtils.java b/eco-api/src/main/java/com/willfp/eco/util/TeamUtils.java index 49b85e71..a0a4ba69 100644 --- a/eco-api/src/main/java/com/willfp/eco/util/TeamUtils.java +++ b/eco-api/src/main/java/com/willfp/eco/util/TeamUtils.java @@ -71,7 +71,7 @@ public final class TeamUtils { * @deprecated Stupid method. */ @NotNull - @Deprecated(since = "6.24.0") + @Deprecated(since = "6.24.0", forRemoval = true) public static Team getMaterialColorTeam(@NotNull final Material material) { return fromChatColor(MATERIAL_COLORS.getOrDefault(material, ChatColor.WHITE)); }