Skip to content

Commit c6e2627

Browse files
committed
Deprecated old argument and suggestion-related classes
Marked `WrappedArgumentType`, `ResultConverter`, and `SuggestionProvider` as `@Deprecated` for removal in 2.3.0. Provided migration references for their replacements in the Javadocs.
1 parent a8a2078 commit c6e2627

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

paper/src/main/java/core/paper/command/ResultConverter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22

33
import com.mojang.brigadier.StringReader;
44
import com.mojang.brigadier.exceptions.CommandSyntaxException;
5+
import io.papermc.paper.command.brigadier.argument.CustomArgumentType;
56
import org.jspecify.annotations.NullMarked;
67

78
/**
89
* Represents a functional interface for converting a value of type T to a value of type R.
910
*
1011
* @param <T> the type of the input value
1112
* @param <R> the type of the converted value
13+
* @deprecated use {@link CustomArgumentType.Converted#convert(Object)}
1214
*/
1315
@NullMarked
1416
@FunctionalInterface
17+
@Deprecated(forRemoval = true, since = "2.3.0")
1518
public interface ResultConverter<T, R> {
1619
/**
1720
* Converts a value of type T to a value of type R.

paper/src/main/java/core/paper/command/SuggestionProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99

1010
/**
1111
* Functional interface for providing suggestions for command arguments.
12+
*
13+
* @deprecated use {@link com.mojang.brigadier.suggestion.SuggestionProvider}
1214
*/
1315
@NullMarked
1416
@FunctionalInterface
17+
@Deprecated(forRemoval = true, since = "2.3.0")
1518
public interface SuggestionProvider {
1619
/**
1720
* Provides suggestions for command arguments.

paper/src/main/java/core/paper/command/WrappedArgumentType.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
*
1818
* @param <T> the type of the native ArgumentType
1919
* @param <V> the type of the parsed value after conversion
20+
* @deprecated use {@link CustomArgumentType.Converted}
2021
*/
2122
@NullMarked
23+
@Deprecated(forRemoval = true, since = "2.3.0")
2224
public class WrappedArgumentType<T, V> implements CustomArgumentType<V, T> {
2325
private final ArgumentType<T> nativeType;
2426
private final ResultConverter<T, V> converter;

0 commit comments

Comments
 (0)