🎨 Fix formatting

This commit is contained in:
Alexander Söderberg 2020-12-16 12:33:33 +01:00 committed by Alexander Söderberg
parent 5224050c99
commit 885cc7e005
3 changed files with 10 additions and 5 deletions

View file

@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Moved the parser injector registry into CommandManager and added injection to CommandContext - Moved the parser injector registry into CommandManager and added injection to CommandContext
- Supporting repeating literals or argument names
### Deprecated ### Deprecated
- String keyed command meta - String keyed command meta

View file

@ -73,6 +73,7 @@ public class Command<C> {
* @param senderType Required sender type. May be {@code null} * @param senderType Required sender type. May be {@code null}
* @param commandPermission Command permission * @param commandPermission Command permission
* @param commandMeta Command meta instance * @param commandMeta Command meta instance
* @since 1.3.0
*/ */
public Command( public Command(
final @NonNull List<@NonNull CommandComponent<C>> commandComponents, final @NonNull List<@NonNull CommandComponent<C>> commandComponents,
@ -115,6 +116,7 @@ public class Command<C> {
* @param commandExecutionHandler Execution handler * @param commandExecutionHandler Execution handler
* @param senderType Required sender type. May be {@code null} * @param senderType Required sender type. May be {@code null}
* @param commandMeta Command meta instance * @param commandMeta Command meta instance
* @since 1.3.0
*/ */
public Command( public Command(
final @NonNull List<@NonNull CommandComponent<C>> commandComponents, final @NonNull List<@NonNull CommandComponent<C>> commandComponents,
@ -132,6 +134,7 @@ public class Command<C> {
* @param commandExecutionHandler Execution handler * @param commandExecutionHandler Execution handler
* @param commandPermission Command permission * @param commandPermission Command permission
* @param commandMeta Command meta instance * @param commandMeta Command meta instance
* @since 1.3.0
*/ */
public Command( public Command(
final @NonNull List<@NonNull CommandComponent<C>> commandComponents, final @NonNull List<@NonNull CommandComponent<C>> commandComponents,
@ -284,7 +287,8 @@ public class Command<C> {
/** /**
* Returns a copy of the command component array * Returns a copy of the command component array
* *
* @return Copy of the command component array. This List is mutable. * @return Copy of the command component array. This List is mutable
* @since 1.3.0
*/ */
public @NonNull List<CommandComponent<@NonNull C>> getComponents() { public @NonNull List<CommandComponent<@NonNull C>> getComponents() {
return new ArrayList<>(this.components); return new ArrayList<>(this.components);
@ -460,7 +464,7 @@ public class Command<C> {
this.commandManager, this.commandManager,
commandMeta, commandMeta,
this.senderType, this.senderType,
this.commandArguments, this.commandComponents,
this.commandExecutionHandler, this.commandExecutionHandler,
this.commandPermission, this.commandPermission,
this.flags this.flags

View file

@ -23,16 +23,16 @@
// //
package cloud.commandframework; package cloud.commandframework;
import java.util.Objects; import cloud.commandframework.arguments.CommandArgument;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
import cloud.commandframework.arguments.CommandArgument; import java.util.Objects;
/** /**
* A single literal or argument component of a command * A single literal or argument component of a command
* *
* @param <C> Command sender type * @param <C> Command sender type
* @since 1.3.0
*/ */
public final class CommandComponent<C> { public final class CommandComponent<C> {
private final CommandArgument<C, ?> argument; private final CommandArgument<C, ?> argument;