Skip to content

Commit

Permalink
Fix similar commands registration issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vjh0107 committed Feb 5, 2024
1 parent c91e38a commit 617112c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ open class GenericCommandExecutor(
protected val commandArgumentConversionService: ConversionService
) : CommandExecutor {
override fun executeCommand(sender: CommandSender, commandName: String, args: Array<String>) {
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) {
Expand Down

0 comments on commit 617112c

Please sign in to comment.