@Override
    public boolean onCommand(CommandSender cs, Command cmnd, String string, String[] strings) {
        LocalPlayer player = plugin.getWorldEditPlugin().wrapCommandSender(cs);
        try{
            CommandHandler cmdHandler = new CommandHandler(strings);

            Method subCommand = this.plugin.getSubCommandByAlias(cmdHandler.getSubCommand());
            
            if(subCommand == null){
                throw new SubCommandNotFoundException(cmdHandler.getSubCommand());
            }
            SubCommand subCmd = subCommand.getAnnotation(SubCommand.class);
            
            if(!player.isPlayer() && !subCmd.console()){
                throw new ConsoleForbiddenException();
            }
            
            if(!player.hasPermission(subCmd.permission())){
                throw new PermissionException(subCmd.permission());
            }
            
            subCommand.invoke(null, player, cmdHandler, plugin);
        }catch(PermissionException e){
            player.printError("You are not allowed to use this command!");
        }catch(ConsoleForbiddenException e){
            player.printError("Only a player is allowed to use this command!");
        }catch(SubCommandNotFoundException e){
            player.printError("Couldn't find the subcommand '" + e.getSubCommand()+"'!");
        }catch(Throwable e){
            player.printError("Please report this error: [See console]");
            player.printRaw(e.getClass().getName() + ": " + e.getMessage());
            e.printStackTrace();
        }
        
        return true;
    }