From 617112cd9015cab97b08ecd08a36b94b4dd2eddb Mon Sep 17 00:00:00 2001 From: junhyung Date: Mon, 5 Feb 2024 10:18:44 +0900 Subject: [PATCH] Fix similar commands registration issue --- .../springbukkit/command/GenericCommandExecutor.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-bukkit-command/src/main/kotlin/kr/summitsystems/springbukkit/command/GenericCommandExecutor.kt b/spring-bukkit-command/src/main/kotlin/kr/summitsystems/springbukkit/command/GenericCommandExecutor.kt index 39d8b43..b738907 100644 --- a/spring-bukkit-command/src/main/kotlin/kr/summitsystems/springbukkit/command/GenericCommandExecutor.kt +++ b/spring-bukkit-command/src/main/kotlin/kr/summitsystems/springbukkit/command/GenericCommandExecutor.kt @@ -20,10 +20,10 @@ open class GenericCommandExecutor( protected val commandArgumentConversionService: ConversionService ) : CommandExecutor { override fun executeCommand(sender: CommandSender, commandName: String, args: Array) { - val inputQualifier = "${commandName}.${args.joinToString(".")}" + val inputQualifier = "${commandName}.${args.joinToString(".")}." val allMappings = commandMappingRegistry.findAllByRoot(commandName) val commandMappings = allMappings.filter { - inputQualifier.startsWith(it.qualifier) + inputQualifier.startsWith(it.qualifier + ".") } val targetMapping = commandMappings.singleOrNull() ?: commandMappingRegistry.find(commandName) if (targetMapping == null) {