File tree Expand file tree Collapse file tree
commands/src/main/java/com/wizardlybump17/wlib/command Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ public Command(@NotNull LiteralCommandNode root) {
145145 String inputString = input .get (i );
146146 boolean isLastInput = i == input .size () - 1 ;
147147
148- if (inputString .isEmpty ()) {
148+ if (inputString != null && inputString .isEmpty ()) {
149149 for (CommandNode <?> child : children ) {
150150 String permission = child .getPermission ();
151151 if (permission == null || sender .hasPermission (permission ))
@@ -162,6 +162,12 @@ public Command(@NotNull LiteralCommandNode root) {
162162
163163 if (!isLastInput ) {
164164 try {
165+ if (inputString == null ) {
166+ if (!child .isValidInput (null ))
167+ throw new InvalidInputException ("Null inputs not accepted by " + child );
168+ continue ;
169+ }
170+
165171 child .parseOrInvalid (inputString );
166172 } catch (InputParsingException | InvalidInputException e ) {
167173 lastError = e ;
You can’t perform that action at this time.
0 commit comments