refactor: Drop custom snakeyaml implementation (#1523)

* refactor: Drop custom snakeyaml implementation

* Merge branch 'main' into chore/main/remove-snakeyaml-wannabe-abstraction
This commit is contained in:
Alex
2022-01-09 10:55:16 +01:00
committed by GitHub
parent c2f3c13a09
commit 9ba90d8c83
137 changed files with 371 additions and 1642 deletions

View File

@ -11,8 +11,6 @@ import java.lang.reflect.Method;
public class BukkitQueueHandler extends QueueHandler {
private static final Logger LOGGER = LogManagerCompat.getLogger();
private volatile boolean timingsEnabled;
private static boolean alertTimingsChange = true;

View File

@ -34,7 +34,7 @@ public class BrushListener implements Listener {
BukkitPlayer player = BukkitAdapter.adapt(bukkitPlayer);
LocalSession session = player.getSession();
Tool tool = session.getTool(player);
if (tool instanceof ScrollTool) {
if (tool instanceof ScrollTool scrollable) {
final int slot = event.getNewSlot();
final int oldSlot = event.getPreviousSlot();
final int ri;
@ -43,7 +43,6 @@ public class BrushListener implements Listener {
} else {
ri = -1;
}
ScrollTool scrollable = (ScrollTool) tool;
if (scrollable.increment(player, ri)) {
bukkitPlayer.getInventory().setHeldItemSlot(oldSlot);
}

View File

@ -53,8 +53,7 @@ public class WorldGuardFeature extends BukkitMaskManager implements Listener {
if (region instanceof GlobalProtectedRegion) {
return RegionWrapper.GLOBAL();
}
if (region instanceof ProtectedPolygonalRegion) {
ProtectedPolygonalRegion casted = (ProtectedPolygonalRegion) region;
if (region instanceof ProtectedPolygonalRegion casted) {
BlockVector3 max = region.getMaximumPoint();
BlockVector3 min = region.getMinimumPoint();
return new Polygonal2DRegion(null, casted.getPoints(), min.getBlockY(), max.getBlockY());

View File

@ -43,6 +43,7 @@ import java.util.UUID;
import static org.bukkit.Bukkit.getWorld;
@SuppressWarnings("unused")
public class FaweDelegateRegionManager {
public boolean setCuboids(

View File

@ -50,6 +50,7 @@ import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.zip.GZIPInputStream;
@SuppressWarnings("unused")
public class FaweDelegateSchematicHandler {
private static final Logger LOGGER = LogManagerCompat.getLogger();

View File

@ -25,6 +25,7 @@ import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
@SuppressWarnings({"unused", "rawtypes"})
public class FaweQueueCoordinator extends QueueCoordinator {
public final IQueueExtent<IQueueChunk> instance;

View File

@ -33,6 +33,7 @@ import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
@SuppressWarnings("unused")
@CommandDeclaration(command = "generatebiome",
permission = "plots.generatebiome",
category = CommandCategory.APPEARANCE,