@Override
	public boolean onCommand(CommandSender sender, Command bukkitCommand, String label, String[] arguments) {
		if (arguments.length == 0) {
			displayUnknownCommand(sender, label);
			return true;
		}
		AbstractCommand<P> command = commands.get(arguments[0].toLowerCase());
		if (command == null) {
			displayUnknownCommand(sender, label);
			return true;
		}
		String[] parameters = (String[]) Arrays.copyOfRange(arguments, 1, arguments.length);
		if (!command.isExecutableAsConsole() && !(sender instanceof Player)) {
			sender.sendMessage(NO_CONSOLE_EXECUTOR);
			return true;
		}
		if (!command.hasPermission(sender)) {
			sender.sendMessage(NO_PERMISSION);
			return true;
		}
		if (!checkUsage(command, parameters)) {
			displayInvalidUsage(sender, command, label);
			return true;
		}
		command.execute(plugin, this, sender, label, parameters);
		return true;
	}