From be7c3da1b736ec2e0f3e79173bb1d8a229c1f57b Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Mon, 11 May 2015 21:48:57 +0200 Subject: [PATCH] Allow null args --- src/com/massivecraft/massivecore/cmd/MassiveCommand.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/massivecraft/massivecore/cmd/MassiveCommand.java b/src/com/massivecraft/massivecore/cmd/MassiveCommand.java index 71b7a295..d972eb1b 100644 --- a/src/com/massivecraft/massivecore/cmd/MassiveCommand.java +++ b/src/com/massivecraft/massivecore/cmd/MassiveCommand.java @@ -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 :)