Reformat project
This commit is contained in:
parent
01d36aecd8
commit
237eda75ef
30 changed files with 130 additions and 87 deletions
|
|
@ -71,18 +71,23 @@ public final class CloudInjectionModule<C> extends AbstractModule {
|
|||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
protected void configure() {
|
||||
final Type commandTreeType = Types.newParameterizedType(CommandTree.class, this.commandSenderType);
|
||||
final Type commandExecutionCoordinatorType = Types.newParameterizedType(CommandExecutionCoordinator.class,
|
||||
this.commandSenderType);
|
||||
final Type commandExecutionCoordinatorType = Types.newParameterizedType(
|
||||
CommandExecutionCoordinator.class,
|
||||
this.commandSenderType
|
||||
);
|
||||
final Type executorFunction = Types.newParameterizedType(Function.class, commandTreeType,
|
||||
commandExecutionCoordinatorType);
|
||||
commandExecutionCoordinatorType
|
||||
);
|
||||
final Key executorFunctionKey = Key.get(executorFunction);
|
||||
this.bind(executorFunctionKey).toInstance(this.commandExecutionCoordinator);
|
||||
final Type commandSenderMapperFunction = Types.newParameterizedType(Function.class, CommandSource.class,
|
||||
this.commandSenderType);
|
||||
this.commandSenderType
|
||||
);
|
||||
final Key commandSenderMapperFunctionKey = Key.get(commandSenderMapperFunction);
|
||||
this.bind(commandSenderMapperFunctionKey).toInstance(this.commandSenderMapper);
|
||||
final Type backwardsCommandSenderMapperFunction = Types.newParameterizedType(Function.class, this.commandSenderType,
|
||||
CommandSource.class);
|
||||
CommandSource.class
|
||||
);
|
||||
final Key backwardsCommandSenderMapperFunctionKey = Key.get(backwardsCommandSenderMapperFunction);
|
||||
this.bind(backwardsCommandSenderMapperFunctionKey).toInstance(this.backwardsCommandSenderMapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import java.util.LinkedList;
|
|||
|
||||
/**
|
||||
* Velocity specific {@link Caption caption keys}
|
||||
*
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public final class VelocityCaptionKeys {
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ public class VelocityCommandManager<C> extends CommandManager<C> implements Brig
|
|||
private final ProxyServer proxyServer;
|
||||
private final Function<CommandSource, C> commandSenderMapper;
|
||||
private final Function<C, CommandSource> backwardsCommandSenderMapper;
|
||||
|
||||
/**
|
||||
* Create a new command manager instance.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ final class VelocityExecutor<C> implements Command<CommandSource> {
|
|||
e.getCorrectSyntax(),
|
||||
NamedTextColor.GRAY
|
||||
)
|
||||
).build())
|
||||
).build()
|
||||
)
|
||||
);
|
||||
} else if (throwable instanceof InvalidCommandSenderException) {
|
||||
this.manager.handleException(
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
|
|||
/**
|
||||
* Create a new argument builder
|
||||
*
|
||||
* @param name Argument name
|
||||
* @param <C> Command sender type
|
||||
* @param name Argument name
|
||||
* @param <C> Command sender type
|
||||
* @return Constructed builder
|
||||
*/
|
||||
public static <C> CommandArgument.@NonNull Builder<C, Player> newBuilder(
|
||||
|
|
@ -90,8 +90,8 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
|
|||
/**
|
||||
* Create a new required player argument
|
||||
*
|
||||
* @param name Argument name
|
||||
* @param <C> Command sender type
|
||||
* @param name Argument name
|
||||
* @param <C> Command sender type
|
||||
* @return Created argument
|
||||
*/
|
||||
public static <C> @NonNull CommandArgument<C, Player> of(
|
||||
|
|
@ -103,8 +103,8 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
|
|||
/**
|
||||
* Create a new optional player argument
|
||||
*
|
||||
* @param name Argument name
|
||||
* @param <C> Command sender type
|
||||
* @param name Argument name
|
||||
* @param <C> Command sender type
|
||||
* @return Created argument
|
||||
*/
|
||||
public static <C> @NonNull CommandArgument<C, Player> optional(
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ public final class ServerArgument<C> extends CommandArgument<C, RegisteredServer
|
|||
/**
|
||||
* Create a new argument builder
|
||||
*
|
||||
* @param name Argument name
|
||||
* @param <C> Command sender type
|
||||
* @param name Argument name
|
||||
* @param <C> Command sender type
|
||||
* @return Constructed builder
|
||||
*/
|
||||
public static <C> CommandArgument.@NonNull Builder<C, RegisteredServer> newBuilder(
|
||||
|
|
@ -90,8 +90,8 @@ public final class ServerArgument<C> extends CommandArgument<C, RegisteredServer
|
|||
/**
|
||||
* Create a new required player argument
|
||||
*
|
||||
* @param name Argument name
|
||||
* @param <C> Command sender type
|
||||
* @param name Argument name
|
||||
* @param <C> Command sender type
|
||||
* @return Created argument
|
||||
*/
|
||||
public static <C> @NonNull CommandArgument<C, RegisteredServer> of(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue