Despical / CommandFramework

A lightweight annotation based command system
https://spigotmc.org/resources/89933
GNU General Public License v3.0
23 stars 5 forks source link

[Bug] Framework can't detect commands #1

Closed Despical closed 2 years ago

Despical commented 2 years ago

Description of Issue

Command Framework can't detect the sub commands when there is a command with the name of main command of this sub command.

Steps to Reproduce

    public Commands() {
        CommandFramework framework = new CommandFramework(this);
        framework.registerCommands(this);
    }

    @Command(
        name = "main"
    )
    public void mainCommand(CommandArguments arguments) {
        System.out.println("Main command"); // this will work bot sub commands related this command won't work
    }

    @Command(
        name = "main.subcommand",
    )
    public void subCommand(CommandArguments arguments) {
        System.out.println("Sub command couldn't be detected and nothing happens."); // this command won't be worked if main command registered
    }

Command Framework Version

1.0.8

Server Version

1.19

Stack Trace/Log Files/Crash Reports

No error or crash.

Additional Information

Despical commented 2 years ago

Issue fixed in latest commit (3032966).