From fc066a04a3d86df44f305294e591a38133afbcb5 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 14 Aug 2018 19:09:14 -0700 Subject: [PATCH] Added SuppressWarnings to classes using deprecated regenerateChunk --- .../bentobox/listeners/flags/CleanSuperFlatListener.java | 1 + .../bentobox/bentobox/managers/island/IslandGrid.java | 9 +++++---- .../world/bentobox/bentobox/util/DeleteIslandChunks.java | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/listeners/flags/CleanSuperFlatListener.java b/src/main/java/world/bentobox/bentobox/listeners/flags/CleanSuperFlatListener.java index f76cf081d..451aa2423 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/flags/CleanSuperFlatListener.java +++ b/src/main/java/world/bentobox/bentobox/listeners/flags/CleanSuperFlatListener.java @@ -21,6 +21,7 @@ import world.bentobox.bentobox.lists.Flags; * */ public class CleanSuperFlatListener extends AbstractFlagListener { + @SuppressWarnings("deprecation") @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onChunkLoad(ChunkLoadEvent e) { BentoBox plugin = BentoBox.getInstance(); diff --git a/src/main/java/world/bentobox/bentobox/managers/island/IslandGrid.java b/src/main/java/world/bentobox/bentobox/managers/island/IslandGrid.java index 66cfee5de..63b7c4a00 100644 --- a/src/main/java/world/bentobox/bentobox/managers/island/IslandGrid.java +++ b/src/main/java/world/bentobox/bentobox/managers/island/IslandGrid.java @@ -1,9 +1,10 @@ package world.bentobox.bentobox.managers.island; -import com.google.common.base.Preconditions; +import org.apache.commons.lang.Validate; + import com.google.common.collect.Table; import com.google.common.collect.TreeBasedTable; -import org.apache.commons.lang.Validate; + import world.bentobox.bentobox.database.objects.Island; /** @@ -34,7 +35,7 @@ public class IslandGrid { grid.put(island.getMinX(), island.getMinZ(), new Cell(CellState.OCCUPIED, island)); return true; } - + /** * Remove island from grid * @param island - the island to remove @@ -51,7 +52,7 @@ public class IslandGrid { } return false; } - + /** * Returns the island at the x,z location or null if there is none. * This includes the full island space, not just the protected area. diff --git a/src/main/java/world/bentobox/bentobox/util/DeleteIslandChunks.java b/src/main/java/world/bentobox/bentobox/util/DeleteIslandChunks.java index 77c671f4e..df6585f83 100644 --- a/src/main/java/world/bentobox/bentobox/util/DeleteIslandChunks.java +++ b/src/main/java/world/bentobox/bentobox/util/DeleteIslandChunks.java @@ -21,6 +21,7 @@ public class DeleteIslandChunks { * @param plugin - plugin object * @param island - island to delete */ + @SuppressWarnings("deprecation") public DeleteIslandChunks(final BentoBox plugin, final Island island) { // Fire event IslandBaseEvent event = IslandEvent.builder().island(island).reason(Reason.DELETE).build();