✨ Add errorprone and fix warnings/errors
The compiler will also treat all warnings as errors from now on.
This commit is contained in:
parent
6ffee9d04f
commit
cfac2639ad
101 changed files with 309 additions and 146 deletions
|
|
@ -48,7 +48,6 @@ public final class BungeeCommand<C> extends Command implements TabExecutor {
|
|||
|
||||
private final BungeeCommandManager<C> manager;
|
||||
private final CommandArgument<C, ?> command;
|
||||
private final cloud.commandframework.Command<C> cloudCommand;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
BungeeCommand(
|
||||
|
|
@ -63,7 +62,6 @@ public final class BungeeCommand<C> extends Command implements TabExecutor {
|
|||
);
|
||||
this.command = command;
|
||||
this.manager = manager;
|
||||
this.cloudCommand = cloudCommand;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -78,7 +76,7 @@ public final class BungeeCommand<C> extends Command implements TabExecutor {
|
|||
sender,
|
||||
builder.toString()
|
||||
)
|
||||
.whenComplete(((commandResult, throwable) -> {
|
||||
.whenComplete((commandResult, throwable) -> {
|
||||
if (throwable != null) {
|
||||
if (throwable instanceof CompletionException) {
|
||||
throwable = throwable.getCause();
|
||||
|
|
@ -154,7 +152,7 @@ public final class BungeeCommand<C> extends Command implements TabExecutor {
|
|||
throwable.printStackTrace();
|
||||
}
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ public class BungeeCommandManager<C> extends CommandManager<C> {
|
|||
* @param commandSenderMapper Function that maps {@link CommandSender} to the command sender type
|
||||
* @param backwardsCommandSenderMapper Function that maps the command sender type to {@link CommandSender}
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public BungeeCommandManager(
|
||||
final @NonNull Plugin owningPlugin,
|
||||
final @NonNull Function<@NonNull CommandTree<C>,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
|||
* Command preprocessor which decorates incoming {@link cloud.commandframework.context.CommandContext}
|
||||
* with Bungee specific objects
|
||||
*
|
||||
* @param <C>
|
||||
* @param <C> Command sender type
|
||||
* @since 1.1.0
|
||||
*/
|
||||
final class BungeeCommandPreprocessor<C> implements CommandPreprocessor<C> {
|
||||
|
|
|
|||
|
|
@ -184,6 +184,8 @@ public final class PlayerArgument<C> extends CommandArgument<C, ProxiedPlayer> {
|
|||
|
||||
public static final class PlayerParseException extends ParserException {
|
||||
|
||||
private static final long serialVersionUID = -2685136673577959929L;
|
||||
|
||||
private PlayerParseException(
|
||||
final @NonNull String input,
|
||||
final @NonNull CommandContext<?> context
|
||||
|
|
|
|||
|
|
@ -172,6 +172,8 @@ public final class ServerArgument<C> extends CommandArgument<C, ServerInfo> {
|
|||
|
||||
public static final class ServerParseException extends ParserException {
|
||||
|
||||
private static final long serialVersionUID = -3825941611365494659L;
|
||||
|
||||
private ServerParseException(
|
||||
final @NonNull String input,
|
||||
final @NonNull CommandContext<?> context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue