mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-30 09:06:45 +01:00
More work
This commit is contained in:
parent
8385387e88
commit
c3613365e9
4
.lift.toml
Normal file
4
.lift.toml
Normal file
@ -0,0 +1,4 @@
|
||||
jdkVersion = "17"
|
||||
build = "gradle clean build -x test"
|
||||
tools = ["findsecbugs", "ErrorProne", "Semgrep", "Detekt", "Infer"]
|
||||
ignoreRules = ["CatchAndPrintStackTrace", "ReferenceEquality", "FallThrough", "FutureReturnValueIgnored", "MixedMutabilityReturnType", "EmptyCatch", "MissingCasesInEnumSwitch", "OperatorPrecedence", "StaticAssignmentInConstructor", "ReferenceEquality", "EqualsHashCode", "EqualsGetClass"]
|
@ -63,7 +63,6 @@ public class BukkitCommand implements CommandExecutor, TabCompleter {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("MixedMutabilityReturnType")
|
||||
@Override
|
||||
public List<String> onTabComplete(
|
||||
CommandSender commandSender, Command command, String label,
|
||||
|
@ -243,7 +243,6 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
return Bukkit.getVersion();
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public void onEnable() {
|
||||
this.pluginName = getDescription().getName();
|
||||
@ -563,7 +562,6 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
ServerLib.checkUnsafeForks();
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
private void unload() {
|
||||
if (!this.methodUnloadSetup) {
|
||||
this.methodUnloadSetup = true;
|
||||
@ -649,7 +647,6 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("FutureReturnValueIgnored")
|
||||
private void startUuidCaching(
|
||||
final @NonNull SQLiteUUIDService sqLiteUUIDService,
|
||||
final @NonNull CacheUUIDService cacheUUIDService
|
||||
@ -750,7 +747,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
return Bukkit.getWorldContainer();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"deprecation", "CatchAndPrintStacktrace"})
|
||||
@SuppressWarnings("deprecation")
|
||||
private void runEntityTask() {
|
||||
TaskManager.runTaskRepeat(() -> this.plotAreaManager.forEachPlotArea(plotArea -> {
|
||||
final World world = Bukkit.getWorld(plotArea.getWorldName());
|
||||
|
@ -461,7 +461,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
||||
this.tamed.tamed = tamed.isTamed();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"EmptyCatch", "deprecation"}) // Paper deprecation
|
||||
@SuppressWarnings("deprecation") // Paper deprecation
|
||||
@Override
|
||||
public Entity spawn(World world, int xOffset, int zOffset) {
|
||||
Location location = new Location(world, this.getX() + xOffset, this.getY(), this.z + zOffset);
|
||||
|
@ -108,7 +108,6 @@ public class BukkitPlotGenerator extends ChunkGenerator
|
||||
return this.platformGenerator;
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public @NonNull List<BlockPopulator> getDefaultPopulators(@NonNull World world) {
|
||||
try {
|
||||
@ -154,7 +153,6 @@ public class BukkitPlotGenerator extends ChunkGenerator
|
||||
return toAdd;
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public @NonNull ChunkData generateChunkData(
|
||||
@NonNull World world, @NonNull Random random, int x, int z,
|
||||
@ -197,7 +195,6 @@ public class BukkitPlotGenerator extends ChunkGenerator
|
||||
return result.getChunkData();
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
private void generate(BlockVector2 loc, World world, ScopedQueueCoordinator result) {
|
||||
// Load if improperly loaded
|
||||
if (!this.loaded) {
|
||||
@ -261,7 +258,6 @@ public class BukkitPlotGenerator extends ChunkGenerator
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"EqualsHashCode", "EqualsGetClass"}) // Valid comparison
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (obj == null) {
|
||||
|
@ -66,7 +66,6 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator {
|
||||
return PlotSquared.platform().defaultGenerator().getNewPlotArea(world, id, min, max);
|
||||
}
|
||||
|
||||
@SuppressWarnings("EmptyCatch")
|
||||
@Override
|
||||
public void generateChunk(final ScopedQueueCoordinator result, PlotArea settings) {
|
||||
World world = BukkitUtil.getWorld(this.world);
|
||||
|
@ -89,7 +89,6 @@ public class BukkitModule extends AbstractModule {
|
||||
this.bukkitPlatform = bukkitPlatform;
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(PlayerManager.class).to(BukkitPlayerManager.class);
|
||||
@ -133,7 +132,6 @@ public class BukkitModule extends AbstractModule {
|
||||
install(new FactoryModuleBuilder().build(ChunkCoordinatorBuilderFactory.class));
|
||||
}
|
||||
|
||||
@SuppressWarnings("EmptyCatch")
|
||||
@Provides
|
||||
@Singleton
|
||||
@NonNull EconHandler provideEconHandler() {
|
||||
|
@ -35,7 +35,6 @@ import org.bukkit.Bukkit;
|
||||
|
||||
public class PermissionModule extends AbstractModule {
|
||||
|
||||
@SuppressWarnings("EmptyCatch")
|
||||
@Provides
|
||||
@Singleton
|
||||
PermissionHandler providePermissionHandler() {
|
||||
|
@ -203,7 +203,6 @@ public class BlockEventListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("MissingCasesInEnumSwitch")
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||
public void onPhysicsEvent(BlockPhysicsEvent event) {
|
||||
Block block = event.getBlock();
|
||||
@ -426,7 +425,6 @@ public class BlockEventListener implements Listener {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings("FallThrough")
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onBlockSpread(BlockSpreadEvent event) {
|
||||
Block block = event.getBlock();
|
||||
@ -531,7 +529,6 @@ public class BlockEventListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("MissingCasesInEnumSwitch")
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onBlockForm(BlockFormEvent event) {
|
||||
if (event instanceof EntityBlockFormEvent) {
|
||||
@ -687,7 +684,6 @@ public class BlockEventListener implements Listener {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings("MissingCaseesInEnumSwitch")
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onFade(BlockFadeEvent event) {
|
||||
Block block = event.getBlock();
|
||||
@ -1076,7 +1072,6 @@ public class BlockEventListener implements Listener {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("OperatorPrecedence")
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onBlockIgnite(BlockIgniteEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
|
@ -139,7 +139,6 @@ public class BlockEventListener117 implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("MissingCasesInEnumSwitch")
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onBlockForm(BlockFormEvent event) {
|
||||
Block block = event.getBlock();
|
||||
|
@ -88,7 +88,6 @@ public class ChunkListener implements Listener {
|
||||
private boolean ignoreUnload = false;
|
||||
private boolean isTrueForNotSave = true;
|
||||
|
||||
@SuppressWarnings({"StaticAssignmentInConstructor", "CatchAndPrintStackTrace"})
|
||||
@Inject
|
||||
public ChunkListener(final @NonNull PlotAreaManager plotAreaManager) {
|
||||
this.plotAreaManager = plotAreaManager;
|
||||
@ -258,7 +257,6 @@ public class ChunkListener implements Listener {
|
||||
processChunk(event.getChunk(), false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("FutureReturnValueIgnored")
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onItemSpawn(ItemSpawnEvent event) {
|
||||
Item entity = event.getEntity();
|
||||
@ -289,7 +287,6 @@ public class ChunkListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("FutureReturnValueIgnored")
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onEntitySpawn(CreatureSpawnEvent event) {
|
||||
LivingEntity entity = event.getEntity();
|
||||
|
@ -85,7 +85,6 @@ public class EntitySpawnListener implements Listener {
|
||||
test(entity);
|
||||
}
|
||||
|
||||
@SuppressWarnings("FutureReturnValueIgnored")
|
||||
public static void test(Entity entity) {
|
||||
@NonNull World world = entity.getWorld();
|
||||
List<MetadataValue> meta = entity.getMetadata(KEY);
|
||||
@ -122,7 +121,6 @@ public class EntitySpawnListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"MissingCaseesInEnumSwitch", "FallThrough"})
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void creatureSpawnEvent(EntitySpawnEvent event) {
|
||||
Entity entity = event.getEntity();
|
||||
|
@ -83,7 +83,6 @@ public class PaperListener implements Listener {
|
||||
this.plotAreaManager = plotAreaManager;
|
||||
}
|
||||
|
||||
@SuppressWarnings("ReferenceEquality")
|
||||
@EventHandler
|
||||
public void onEntityPathfind(EntityPathfindEvent event) {
|
||||
if (!Settings.Paper_Components.ENTITY_PATHING) {
|
||||
@ -118,7 +117,6 @@ public class PaperListener implements Listener {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings("ReferenceEquality")
|
||||
@EventHandler
|
||||
public void onEntityPathfind(SlimePathfindEvent event) {
|
||||
if (!Settings.Paper_Components.ENTITY_PATHING) {
|
||||
@ -161,7 +159,6 @@ public class PaperListener implements Listener {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"MissingCasesInEnumSwitch", "FallThrough"})
|
||||
@EventHandler
|
||||
public void onPreCreatureSpawnEvent(PreCreatureSpawnEvent event) {
|
||||
if (!Settings.Paper_Components.CREATURE_SPAWN) {
|
||||
@ -366,7 +363,6 @@ public class PaperListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("EmptyCatch")
|
||||
@EventHandler
|
||||
public void onAsyncTabCompletion(final AsyncTabCompleteEvent event) {
|
||||
if (!Settings.Paper_Components.ASYNC_TAB_COMPLETION) {
|
||||
|
@ -430,7 +430,6 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
||||
playerMove(event);
|
||||
}
|
||||
|
||||
@SuppressWarnings("FutureReturnValueIgnored")
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void vehicleMove(VehicleMoveEvent event)
|
||||
throws IllegalAccessException {
|
||||
@ -808,7 +807,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"deprecation", "FallThrough"})
|
||||
@SuppressWarnings("deprecation")
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onInventoryClick(InventoryClickEvent event) {
|
||||
/*if (!event.isLeftClick() || (event.getAction() != InventoryAction.PLACE_ALL) || event
|
||||
|
@ -48,7 +48,6 @@ public class SingleWorldListener implements Listener {
|
||||
private final Method methodGetHandleChunk;
|
||||
private Field shouldSave;
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
public SingleWorldListener() throws Exception {
|
||||
ReflectionUtils.RefClass classCraftChunk = getRefClass("{cb}.CraftChunk");
|
||||
this.methodGetHandleChunk = classCraftChunk.getMethod("getHandle").getRealMethod();
|
||||
@ -69,7 +68,6 @@ public class SingleWorldListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
public void markChunkAsClean(Chunk chunk) {
|
||||
try {
|
||||
Object nmsChunk = methodGetHandleChunk.invoke(chunk);
|
||||
|
@ -64,7 +64,6 @@ public class BukkitWorldManager implements PlatformWorldManager<World> {
|
||||
return Bukkit.createWorld(wc);
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
protected void setGenerator(final @Nullable String worldName, final @Nullable String generator) {
|
||||
if (generator == null) {
|
||||
return;
|
||||
|
@ -148,7 +148,6 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
private void callEvent(final @NonNull Event event) {
|
||||
final RegisteredListener[] listeners = event.getHandlers().getRegisteredListeners();
|
||||
for (final RegisteredListener listener : listeners) {
|
||||
@ -229,7 +228,6 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
return max;
|
||||
}
|
||||
|
||||
@SuppressWarnings("FutureReturnValueIgnored")
|
||||
@Override
|
||||
public void teleport(final @NonNull Location location, final @NonNull TeleportCause cause) {
|
||||
if (Math.abs(location.getX()) >= 30000000 || Math.abs(location.getZ()) >= 30000000) {
|
||||
@ -317,7 +315,6 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
this.player.setAllowFlight(fly);
|
||||
}
|
||||
|
||||
@SuppressWarnings("ReferenceEquality")
|
||||
@Override
|
||||
public void playMusic(final @NonNull Location location, final @NonNull ItemType id) {
|
||||
if (id == ItemTypes.AIR) {
|
||||
@ -341,7 +338,6 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
this.player.kickPlayer(message);
|
||||
}
|
||||
|
||||
@SuppressWarnings("ReferenceEquality")
|
||||
@Override
|
||||
public void stopSpectating() {
|
||||
if (getGameMode() == SPECTATOR) {
|
||||
|
@ -193,7 +193,6 @@ public final class BukkitChunkCoordinator extends ChunkCoordinator {
|
||||
/**
|
||||
* Requests a batch of chunks to be loaded
|
||||
*/
|
||||
@SuppressWarnings("FutureReturnValueIgnored")
|
||||
private void requestBatch() {
|
||||
BlockVector2 chunk;
|
||||
for (int i = 0; i < this.batchSize && (chunk = this.requestedChunks.poll()) != null; i++) {
|
||||
|
@ -337,7 +337,6 @@ public class BukkitEntityUtil {
|
||||
&& !(victim instanceof Creature)));
|
||||
}
|
||||
|
||||
@SuppressWarnings("OperatorPrecedence")
|
||||
public static boolean checkEntity(Entity entity, Plot plot) {
|
||||
if (plot == null || !plot.hasOwner() || plot.getFlags().isEmpty() && plot.getArea()
|
||||
.getFlagContainer().getFlagMap().isEmpty()) {
|
||||
|
@ -94,7 +94,6 @@ public class BukkitRegionManager extends RegionManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"FutureReturnValueIgnored", "OperatorPrecedence"})
|
||||
@Override
|
||||
public int[] countEntities(@NonNull Plot plot) {
|
||||
int[] existing = (int[]) plot.getMeta("EntityCount");
|
||||
|
@ -74,7 +74,6 @@ public class BukkitSetupUtils extends SetupUtils {
|
||||
this.worldFile = worldFile;
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public void updateGenerators(final boolean force) {
|
||||
if (!SetupUtils.generators.isEmpty() && !force) {
|
||||
@ -127,7 +126,6 @@ public class BukkitSetupUtils extends SetupUtils {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public String setupWorld(PlotAreaBuilder builder) {
|
||||
this.updateGenerators(false);
|
||||
|
@ -193,7 +193,6 @@ public class BukkitUtil extends WorldUtil {
|
||||
return Bukkit.getWorld(string);
|
||||
}
|
||||
|
||||
@SuppressWarnings("FutureReturnValueIgnored")
|
||||
private static void ensureLoaded(
|
||||
final @NonNull String world,
|
||||
final int x,
|
||||
@ -204,7 +203,6 @@ public class BukkitUtil extends WorldUtil {
|
||||
.thenAccept(chunk -> ensureMainThread(chunkConsumer, chunk));
|
||||
}
|
||||
|
||||
@SuppressWarnings("FutureReturnValueIgnored")
|
||||
private static void ensureLoaded(final @NonNull Location location, final @NonNull Consumer<Chunk> chunkConsumer) {
|
||||
PaperLib.getChunkAtAsync(adapt(location), true).thenAccept(chunk -> ensureMainThread(chunkConsumer, chunk));
|
||||
}
|
||||
@ -293,7 +291,6 @@ public class BukkitUtil extends WorldUtil {
|
||||
return bukkitWorld.getMaxHeight() - 1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public @NonNull String[] getSignSynchronous(final @NonNull Location location) {
|
||||
Block block = Objects.requireNonNull(getWorld(location.getWorldName())).getBlockAt(
|
||||
@ -573,7 +570,6 @@ public class BukkitUtil extends WorldUtil {
|
||||
getChunkAt(chunk.getBlockX(), chunk.getBlockZ()).getTileEntities().length;
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public Set<BlockVector2> getChunkChunks(String world) {
|
||||
Set<BlockVector2> chunks = super.getChunkChunks(world);
|
||||
|
@ -52,7 +52,6 @@ public class EssentialsUUIDService implements UUIDService {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@SuppressWarnings("EmptyCatch")
|
||||
@Override
|
||||
public @NonNull List<UUIDMapping> getUUIDs(final @NonNull List<String> usernames) {
|
||||
final List<UUIDMapping> mappings = new ArrayList<>(usernames.size());
|
||||
|
@ -53,7 +53,6 @@ public class LuckPermsUUIDService implements UUIDService {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("EmptyCatch")
|
||||
@Override
|
||||
public @NonNull List<UUIDMapping> getNames(final @NonNull List<UUID> uuids) {
|
||||
final List<UUIDMapping> mappings = new ArrayList<>(uuids.size());
|
||||
@ -70,7 +69,6 @@ public class LuckPermsUUIDService implements UUIDService {
|
||||
return mappings;
|
||||
}
|
||||
|
||||
@SuppressWarnings("EmptyCatch")
|
||||
@Override
|
||||
public @NonNull List<UUIDMapping> getUUIDs(final @NonNull List<String> usernames) {
|
||||
final List<UUIDMapping> mappings = new ArrayList<>(usernames.size());
|
||||
|
@ -43,7 +43,6 @@ import java.util.UUID;
|
||||
*/
|
||||
public class OfflinePlayerUUIDService implements UUIDService {
|
||||
|
||||
@SuppressWarnings({"EmptyCatch", "MixedMutabilityReturnType"})
|
||||
@Override
|
||||
public @NonNull List<UUIDMapping> getNames(final @NonNull List<UUID> uuids) {
|
||||
if (Settings.UUID.FORCE_LOWERCASE || Bukkit.getWorlds().isEmpty()) {
|
||||
|
@ -49,7 +49,6 @@ public class SQLiteUUIDService implements UUIDService, Consumer<List<UUIDMapping
|
||||
|
||||
private final SQLite sqlite;
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
public SQLiteUUIDService(final String fileName) {
|
||||
this.sqlite =
|
||||
new SQLite(FileUtils.getFile(PlotSquared.platform().getDirectory(), fileName));
|
||||
@ -73,7 +72,6 @@ public class SQLiteUUIDService implements UUIDService, Consumer<List<UUIDMapping
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public @NonNull List<UUIDMapping> getNames(final @NonNull List<UUID> uuids) {
|
||||
final List<UUIDMapping> mappings = new ArrayList<>(uuids.size());
|
||||
@ -93,7 +91,6 @@ public class SQLiteUUIDService implements UUIDService, Consumer<List<UUIDMapping
|
||||
return mappings;
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public @NonNull List<UUIDMapping> getUUIDs(@NonNull List<String> usernames) {
|
||||
final List<UUIDMapping> mappings = new ArrayList<>(usernames.size());
|
||||
@ -116,7 +113,6 @@ public class SQLiteUUIDService implements UUIDService, Consumer<List<UUIDMapping
|
||||
return mappings;
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public void accept(final List<UUIDMapping> uuidWrappers) {
|
||||
try (final PreparedStatement statement = getConnection()
|
||||
@ -136,7 +132,6 @@ public class SQLiteUUIDService implements UUIDService, Consumer<List<UUIDMapping
|
||||
*
|
||||
* @return All read mappings
|
||||
*/
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
public @NonNull List<UUIDMapping> getAll() {
|
||||
final List<UUIDMapping> mappings = new LinkedList<>();
|
||||
try (final PreparedStatement statement = getConnection().prepareStatement("SELECT * FROM `usercache`")) {
|
||||
|
@ -67,7 +67,6 @@ public class SquirrelIdUUIDService implements UUIDService {
|
||||
this.rateLimiter = RateLimiter.create(rateLimit / 600.0D);
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public @NonNull List<UUIDMapping> getNames(final @NonNull List<UUID> uuids) {
|
||||
final List<UUIDMapping> results = new ArrayList<>(uuids.size());
|
||||
@ -103,7 +102,6 @@ public class SquirrelIdUUIDService implements UUIDService {
|
||||
return results;
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchAndPrintStackTrace")
|
||||
@Override
|
||||
public @NonNull List<UUIDMapping> getUUIDs(final @NonNull List<String> usernames) {
|
||||
final List<UUIDMapping> results = new ArrayList<>(usernames.size());
|
||||
|
Loading…
Reference in New Issue
Block a user