Correct tip for unknown sub-commands

This commit is contained in:
filoghost 2020-09-17 16:51:10 +02:00
parent 10482e6e10
commit 8858198c70

View File

@ -50,6 +50,12 @@ public class CommandHandler extends MultiCommandManager {
sender.sendMessage(ChatColor.GREEN + "Commands: " + ChatColor.GRAY + "/" + rootCommandLabel + " help");
}
@Override
protected void sendUnknownSubCommandMessage(SubCommandSession session) {
session.getSender().sendMessage(ChatColor.RED + "Unknown sub-command \"" + session.getSubLabelUsed() + "\". "
+ "Use \"/" + session.getRootLabelUsed() + " help\" to see available commands.");
}
@Name("help")
@Permission(Permissions.COMMAND_PREFIX + "help")
public void help(CommandSender sender, SubCommandSession session) {