Add errorprone and fix warnings/errors

The compiler will also treat all warnings as errors from now on.
This commit is contained in:
Alexander Söderberg 2020-10-23 10:20:45 +02:00 committed by Alexander Söderberg
parent 6ffee9d04f
commit cfac2639ad
101 changed files with 309 additions and 146 deletions

View file

@ -2,4 +2,6 @@ dependencies {
api project(':cloud-bukkit')
compileOnly "com.destroystokyo.paper:paper-api:${vers['paper-api']}"
compileOnly "com.destroystokyo.paper:paper-mojangapi:${vers['paper-api']}"
compileOnly "org.jetbrains:annotations:${vers['jb-annotations']}"
compileOnly "com.google.guava:guava:${vers['guava']}"
}

View file

@ -30,7 +30,6 @@ import cloud.commandframework.bukkit.BukkitBrigadierMapper;
import cloud.commandframework.context.CommandContext;
import cloud.commandframework.permission.CommandPermission;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
import com.destroystokyo.paper.event.brigadier.CommandRegisteredEvent;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginIdentifiableCommand;
import org.bukkit.event.EventHandler;
@ -60,7 +59,8 @@ class PaperBrigadierListener<C> implements Listener {
@EventHandler
@SuppressWarnings("deprecation")
public void onCommandRegister(final @NonNull CommandRegisteredEvent<BukkitBrigadierCommandSource> event) {
public void onCommandRegister(final com.destroystokyo.paper.event.brigadier
.@NonNull CommandRegisteredEvent<BukkitBrigadierCommandSource> event) {
if (!(event.getCommand() instanceof PluginIdentifiableCommand)) {
return;
} else if (!((PluginIdentifiableCommand) event.getCommand())