Code example for Pattern

Methods: split

0
 
    /** 
     * {@inheritDoc} 
     */ 
    public boolean dispatch(CommandSender sender, String commandLine) throws CommandException {
        String[] args = PATTERN_ON_SPACE.split(commandLine);
 
        if (args.length == 0) {
            return false; 
        } 
 
        String sentCommandLabel = args[0].toLowerCase();
        Command target = getCommand(sentCommandLabel);
 
        if (target == null) {
            return false; 
        } 
        try { 
            // MCPC+ start - if command is a mod command, check permissions and route through vanilla 
            if (target instanceof ModCustomCommand)
            {