Miscellaneous grammar improvements

This commit is contained in:
chickeneer
2021-12-21 20:46:53 -06:00
parent 3295b82df6
commit 4d3b0192fc
10 changed files with 80 additions and 51 deletions
@@ -164,7 +164,7 @@ public class CommandContexts<R extends CommandExecutionContext<?, ? extends Comm
return s.charAt(0);
});
registerContext(String.class, (c) -> {
// This will fail fast, its either in the values or its not
// This will fail fast, it's either in the values or it's not
if (c.hasAnnotation(Values.class)) {
return c.popFirstArg();
}
@@ -239,7 +239,7 @@ public class CommandContexts<R extends CommandExecutionContext<?, ? extends Comm
} else if (first != null && ACFUtil.isInteger(first)) {
c.popFirstArg();
page = ACFUtil.parseInt(first);
if (page == null){
if (page == null) {
throw new InvalidCommandArgument(MessageKeys.MUST_BE_A_NUMBER, "{num}", first);
}
if (!c.getArgs().isEmpty()) {
@@ -294,7 +294,7 @@ public class CommandContexts<R extends CommandExecutionContext<?, ? extends Comm
/**
* @see #registerIssuerAwareContext(Class, IssuerAwareContextResolver)
* @deprecated Please switch to {@link #registerIssuerAwareContext(Class, IssuerAwareContextResolver)}
* as the core wants to use the platform agnostic term of "Issuer" instead of Sender
* as the core wants to use the platform-agnostic term of "Issuer" instead of Sender
*/
@Deprecated
public <T> void registerSenderAwareContext(Class<T> context, IssuerAwareContextResolver<T, R> supplier) {
@@ -338,7 +338,7 @@ public abstract class CommandManager<
}
/**
* Sets the default {@link ExceptionHandler} that is called when an exception occurs while executing a command, if the command doesn't have it's own exception handler registered.
* Sets the default {@link ExceptionHandler} that is called when an exception occurs while executing a command, if the command doesn't have its own exception handler registered.
*
* @param exceptionHandler the handler that should handle uncaught exceptions. May not be null if logExceptions is false
*/
@@ -350,7 +350,7 @@ public abstract class CommandManager<
}
/**
* Sets the default {@link ExceptionHandler} that is called when an exception occurs while executing a command, if the command doesn't have it's own exception handler registered, and lets you control if ACF should also log the exception still.
* Sets the default {@link ExceptionHandler} that is called when an exception occurs while executing a command, if the command doesn't have its own exception handler registered, and lets you control if ACF should also log the exception still.
* <p>
* If you disable logging, you need to log it yourself in your handler.
*