Skip to content
Permalink
Browse files

Use getter for command conditions (#225)

  • Loading branch information...
JOO200 authored and chickeneer committed Jul 8, 2019
1 parent 96e5414 commit d17055eb997380b1749d141b47206eacc485ba7d
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/src/main/java/co/aikar/commands/RegisteredCommand.java
@@ -145,7 +145,7 @@ void invoke(CommandIssuer sender, List<String> args, CommandOperationContext con
}
preCommand();
try {
this.manager.conditions.validateConditions(context);
this.manager.getCommandConditions().validateConditions(context);
Map<String, Object> passedArgs = resolveContexts(sender, args);
if (passedArgs == null) return;

@@ -256,7 +256,7 @@ void handleException(CommandIssuer sender, List<String> args, Throwable e) {
throw new IllegalStateException("Parameter " + parameter.getName() + " is primitive and does not support Optional.");
}
//noinspection unchecked
this.manager.conditions.validateConditions(context, value);
this.manager.getCommandConditions().validateConditions(context, value);
passedArgs.put(parameterName, value);
continue;
} else if (requiresInput) {
@@ -296,7 +296,7 @@ void handleException(CommandIssuer sender, List<String> args, Throwable e) {
Object paramValue = resolver.getContext(context);

//noinspection unchecked
this.manager.conditions.validateConditions(context, paramValue);
this.manager.getCommandConditions().validateConditions(context, paramValue);
passedArgs.put(parameterName, paramValue);
}
return passedArgs;

0 comments on commit d17055e

Please sign in to comment.
You can’t perform that action at this time.