Allow null args
This commit is contained in:
1 parent
345ad47ac8
commit
be7c3da1b7
1 file changed
+4
-1
@@ -622,7 +622,10 @@ public class MassiveCommand
|
||||
AR<?> reader = this.getArgReader(i);
|
||||
|
||||
if (ret[i] != null) continue settings; // If that index is already filled.
|
||||
if ( ! reader.isValid(arg, sender)) continue settings; // If this arg isn't valid for that index.
|
||||
|
||||
// We do in fact want to allow null args.
|
||||
// Those are used by us in some special circumstances.
|
||||
if (arg != null && ! reader.isValid(arg, sender)) continue settings; // If this arg isn't valid for that index.
|
||||
|
||||
ret[i] = arg;
|
||||
continue args; // That arg is now set :)
|
||||
|
||||
Reference in new issue
Block a user