Marked more deprecated things as for removal
This commit is contained in:
@@ -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+"
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<Enchantment, Integer> getEnchantmentsOnItem(boolean checkStored) {
|
||||
return getEnchants(checkStored);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user