From c16994fa3e87210a6c6b8f92c958b28442693b69 Mon Sep 17 00:00:00 2001 From: Traqueur_ Date: Tue, 26 Aug 2025 13:47:43 +0200 Subject: [PATCH] fix: remove wrapper Enum to directly return T in EnumArgument --- .../fr/traqueur/commands/impl/arguments/EnumArgument.java | 4 ++-- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/fr/traqueur/commands/impl/arguments/EnumArgument.java b/core/src/main/java/fr/traqueur/commands/impl/arguments/EnumArgument.java index 36e19b9..fb1da16 100644 --- a/core/src/main/java/fr/traqueur/commands/impl/arguments/EnumArgument.java +++ b/core/src/main/java/fr/traqueur/commands/impl/arguments/EnumArgument.java @@ -13,7 +13,7 @@ * @param The type of the enum. * @param The type of the sender (e.g., player, console). */ -public class EnumArgument, S> implements ArgumentConverter>, TabCompleter { +public class EnumArgument, S> implements ArgumentConverter, TabCompleter { /** * Creates a new EnumArgument instance for the specified enum class. @@ -47,7 +47,7 @@ public EnumArgument(Class clazz) { * @return The enum class */ @Override - public Enum apply(String s) { + public T apply(String s) { if (s == null || s.isEmpty()) { return null; } diff --git a/gradle.properties b/gradle.properties index c17a8d8..c2dadcf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=4.2.1 \ No newline at end of file +version=4.2.2 \ No newline at end of file