From 29f5123f0118cb6070b8e427a1a21df1182fca98 Mon Sep 17 00:00:00 2001 From: Traqueur_ Date: Sun, 4 Jan 2026 20:51:16 +0100 Subject: [PATCH 1/2] feat(core): add wrapper and primitive type in internal converters --- .../java/fr/traqueur/commands/api/CommandManager.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/src/main/java/fr/traqueur/commands/api/CommandManager.java b/core/src/main/java/fr/traqueur/commands/api/CommandManager.java index a3782e2..73d9560 100644 --- a/core/src/main/java/fr/traqueur/commands/api/CommandManager.java +++ b/core/src/main/java/fr/traqueur/commands/api/CommandManager.java @@ -465,9 +465,18 @@ public CommandInvoker getInvoker() { */ private void registerInternalConverters() { this.registerConverter(String.class, (s) -> s); + + // Register both primitive and wrapper types for DefaultArgumentParser (Spigot/Velocity). + // JDA's ArgumentParser handles primitives internally, but text-based platforms need explicit registration. + // Wrapper types (Integer.class, Long.class, etc.) are registered for compatibility with wrapper usage. + // Primitive types (int.class, long.class, etc.) are registered to support primitive method parameters. this.registerConverter(Boolean.class, new BooleanArgument<>()); + this.registerConverter(boolean.class, new BooleanArgument<>()); this.registerConverter(Integer.class, new IntegerArgument()); + this.registerConverter(int.class, new IntegerArgument()); this.registerConverter(Double.class, new DoubleArgument()); + this.registerConverter(double.class, new DoubleArgument()); this.registerConverter(Long.class, new LongArgument()); + this.registerConverter(long.class, new LongArgument()); } } From ee31c9c278252d509fb9a74cf62376765481012e Mon Sep 17 00:00:00 2001 From: Traqueur_ Date: Sun, 4 Jan 2026 20:52:11 +0100 Subject: [PATCH 2/2] feat(core): version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f81469e..8656a1e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=5.0.0 \ No newline at end of file +version=5.0.1 \ No newline at end of file