From 289b832b9a4ae6e372e2107fcc7816134ccc9b06 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Wed, 20 Jan 2016 13:56:31 -0800 Subject: [PATCH] Ignored lots of compiler warnings. Mostly these are deprecations from the Spigot team which I believe shouldn't be deprecated. For example, players refer to each other by name, not UUID - so there will always be a need for player lookup by name. Also the block IDs are a well-documented standard that everyone understands, even if they're not very human-friendly. Plugins use those IDs and data values to specify block types for example in config files. As for the rest of the ignores, I either decided the warnings are just noise based on the situation, or that I'm comfortable with the risks. Possibly for the first time in 5 years of dev work on this plugin, I just compiled without any warnings. :) --- .../GriefPrevention/AutoExtendClaimTask.java | 1 + .../GriefPrevention/BlockEventHandler.java | 8 ++-- .../ryanhamshire/GriefPrevention/Claim.java | 3 +- .../GriefPrevention/DataStore.java | 13 ++++-- .../DeliverClaimBlocksTask.java | 3 +- .../GriefPrevention/EntityEventHandler.java | 3 +- .../GriefPrevention/FlatFileDataStore.java | 1 - .../GriefPrevention/GriefPrevention.java | 15 ++++--- .../GriefPrevention/PlayerData.java | 3 -- .../GriefPrevention/PlayerEventHandler.java | 22 +++++----- .../GriefPrevention/PlayerKickBanTask.java | 3 -- .../RestoreNatureExecutionTask.java | 3 +- .../RestoreNatureProcessingTask.java | 42 ++++++++++++------- .../GriefPrevention/SecureClaimTask.java | 3 +- .../GriefPrevention/Visualization.java | 6 ++- .../VisualizationApplicationTask.java | 3 +- .../events/ClaimDeletedEvent.java | 2 - 17 files changed, 80 insertions(+), 54 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/AutoExtendClaimTask.java b/src/me/ryanhamshire/GriefPrevention/AutoExtendClaimTask.java index fb85730..a3c039c 100644 --- a/src/me/ryanhamshire/GriefPrevention/AutoExtendClaimTask.java +++ b/src/me/ryanhamshire/GriefPrevention/AutoExtendClaimTask.java @@ -31,6 +31,7 @@ class AutoExtendClaimTask implements Runnable } } + @SuppressWarnings("deprecation") private int getLowestBuiltY() { int y = this.claim.getLesserBoundaryCorner().getBlockY(); diff --git a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java index 48ea0ce..618d843 100644 --- a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java @@ -139,7 +139,8 @@ public class BlockEventHandler implements Listener if(!player.hasPermission("griefprevention.eavesdropsigns")) { - Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); + @SuppressWarnings("unchecked") + Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); for(Player otherPlayer : players) { if(otherPlayer.hasPermission("griefprevention.eavesdropsigns")) @@ -174,7 +175,8 @@ public class BlockEventHandler implements Listener } //when a player places a block... - @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) + @SuppressWarnings("null") + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) public void onBlockPlace(BlockPlaceEvent placeEvent) { Player player = placeEvent.getPlayer(); @@ -754,7 +756,7 @@ public class BlockEventHandler implements Listener //from where? Block fromBlock = dispenseEvent.getBlock(); - Dispenser dispenser = new Dispenser(fromBlock.getType(), fromBlock.getData()); + Dispenser dispenser = (Dispenser)fromBlock.getState(); //to where? Block toBlock = fromBlock.getRelative(dispenser.getFacing()); diff --git a/src/me/ryanhamshire/GriefPrevention/Claim.java b/src/me/ryanhamshire/GriefPrevention/Claim.java index a9aa581..1947663 100644 --- a/src/me/ryanhamshire/GriefPrevention/Claim.java +++ b/src/me/ryanhamshire/GriefPrevention/Claim.java @@ -825,7 +825,8 @@ public class Claim return thisCorner.getWorld().getName().compareTo(otherCorner.getWorld().getName()) < 0; } - long getPlayerInvestmentScore() + @SuppressWarnings("deprecation") + long getPlayerInvestmentScore() { //decide which blocks will be considered player placed Location lesserBoundaryCorner = this.getLesserBoundaryCorner(); diff --git a/src/me/ryanhamshire/GriefPrevention/DataStore.java b/src/me/ryanhamshire/GriefPrevention/DataStore.java index 34c5626..2b8c663 100644 --- a/src/me/ryanhamshire/GriefPrevention/DataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/DataStore.java @@ -345,7 +345,9 @@ public abstract class DataStore class NoTransferException extends Exception { - NoTransferException(String message) + private static final long serialVersionUID = 1L; + + NoTransferException(String message) { super(message); } @@ -1005,7 +1007,8 @@ public abstract class DataStore //if the claim should be opened to looting if(grantAccess) { - Player winner = GriefPrevention.instance.getServer().getPlayer(winnerName); + @SuppressWarnings("deprecation") + Player winner = GriefPrevention.instance.getServer().getPlayer(winnerName); if(winner != null) { //notify the winner @@ -1020,8 +1023,10 @@ public abstract class DataStore //if the siege ended due to death, transfer inventory to winner if(death) { - Player winner = GriefPrevention.instance.getServer().getPlayer(winnerName); - Player loser = GriefPrevention.instance.getServer().getPlayer(loserName); + @SuppressWarnings("deprecation") + Player winner = GriefPrevention.instance.getServer().getPlayer(winnerName); + @SuppressWarnings("deprecation") + Player loser = GriefPrevention.instance.getServer().getPlayer(loserName); if(winner != null && loser != null) { //get loser's inventory, then clear it diff --git a/src/me/ryanhamshire/GriefPrevention/DeliverClaimBlocksTask.java b/src/me/ryanhamshire/GriefPrevention/DeliverClaimBlocksTask.java index 5a73265..c015beb 100644 --- a/src/me/ryanhamshire/GriefPrevention/DeliverClaimBlocksTask.java +++ b/src/me/ryanhamshire/GriefPrevention/DeliverClaimBlocksTask.java @@ -43,7 +43,8 @@ class DeliverClaimBlocksTask implements Runnable //if no player specified, this task will create a player-specific task for each online player, scheduled one tick apart if(this.player == null) { - Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); + @SuppressWarnings("unchecked") + Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); long i = 0; for(Player onlinePlayer : players) diff --git a/src/me/ryanhamshire/GriefPrevention/EntityEventHandler.java b/src/me/ryanhamshire/GriefPrevention/EntityEventHandler.java index 65c4487..a6501a8 100644 --- a/src/me/ryanhamshire/GriefPrevention/EntityEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/EntityEventHandler.java @@ -50,7 +50,6 @@ import org.bukkit.entity.Monster; import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; import org.bukkit.entity.Rabbit; -import org.bukkit.entity.Rabbit.Type; import org.bukkit.entity.Tameable; import org.bukkit.entity.ThrownPotion; import org.bukkit.entity.Villager; @@ -166,6 +165,7 @@ public class EntityEventHandler implements Listener { //when not allowed, drop as item instead of forming a block event.setCancelled(true); + @SuppressWarnings("deprecation") ItemStack itemStack = new ItemStack(entity.getMaterial(), 1, entity.getBlockData()); Item item = block.getWorld().dropItem(entity.getLocation(), itemStack); item.setVelocity(new Vector()); @@ -218,6 +218,7 @@ public class EntityEventHandler implements Listener this.handleExplosion(explodeEvent.getBlock().getLocation(), null, explodeEvent.blockList()); } + @SuppressWarnings("deprecation") void handleExplosion(Location location, Entity entity, List blocks) { //only applies to claims-enabled worlds diff --git a/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java b/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java index df7aecd..17737c7 100644 --- a/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java @@ -28,7 +28,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.regex.Matcher; import org.bukkit.*; -import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; diff --git a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java index 3609b2a..fe624dc 100644 --- a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -374,7 +374,8 @@ public class GriefPrevention extends JavaPlugin namesThread.start(); //load ignore lists for any already-online players - Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); + @SuppressWarnings("unchecked") + Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); for(Player player : players) { new IgnoreLoaderThread(player.getUniqueId(), this.dataStore.getPlayerData(player.getUniqueId()).ignoredPlayers).start(); @@ -926,7 +927,8 @@ public class GriefPrevention extends JavaPlugin } //handles slash commands - public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){ + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){ Player player = null; if (sender instanceof Player) @@ -2878,7 +2880,8 @@ public class GriefPrevention extends JavaPlugin } } - public OfflinePlayer resolvePlayerByName(String name) + @SuppressWarnings("deprecation") + public OfflinePlayer resolvePlayerByName(String name) { //try online players first Player targetPlayer = this.getServer().getPlayerExact(name); @@ -2951,7 +2954,8 @@ public class GriefPrevention extends JavaPlugin public void onDisable() { //save data for any online players - Collection players = (Collection)this.getServer().getOnlinePlayers(); + @SuppressWarnings("unchecked") + Collection players = (Collection)this.getServer().getOnlinePlayers(); for(Player player : players) { UUID playerID = player.getUniqueId(); @@ -3222,7 +3226,8 @@ public class GriefPrevention extends JavaPlugin } } - public void restoreChunk(Chunk chunk, int miny, boolean aggressiveMode, long delayInTicks, Player playerReceivingVisualization) + @SuppressWarnings("deprecation") + public void restoreChunk(Chunk chunk, int miny, boolean aggressiveMode, long delayInTicks, Player playerReceivingVisualization) { //build a snapshot of this chunk, including 1 block boundary outside of the chunk all the way around int maxHeight = chunk.getWorld().getMaxHeight(); diff --git a/src/me/ryanhamshire/GriefPrevention/PlayerData.java b/src/me/ryanhamshire/GriefPrevention/PlayerData.java index 4d47501..218970c 100644 --- a/src/me/ryanhamshire/GriefPrevention/PlayerData.java +++ b/src/me/ryanhamshire/GriefPrevention/PlayerData.java @@ -19,9 +19,7 @@ package me.ryanhamshire.GriefPrevention; import java.net.InetAddress; import java.util.Calendar; -import java.util.Collections; import java.util.Date; -import java.util.Set; import java.util.UUID; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; @@ -34,7 +32,6 @@ import me.ryanhamshire.GriefPrevention.Visualization; import org.bukkit.Location; import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; //holds all of GriefPrevention's player-tied data public class PlayerData diff --git a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java index 61ce011..185e0f9 100644 --- a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java @@ -31,19 +31,14 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.regex.Pattern; -import org.bukkit.Achievement; -import org.bukkit.BanList; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Chunk; -import org.bukkit.ChunkSnapshot; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.OfflinePlayer; import org.bukkit.TravelAgent; -import org.bukkit.BanList.Type; -import org.bukkit.World; import org.bukkit.World.Environment; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -56,7 +51,6 @@ import org.bukkit.entity.EntityType; import org.bukkit.entity.Hanging; import org.bukkit.entity.Horse; import org.bukkit.entity.Item; -import org.bukkit.entity.ItemFrame; import org.bukkit.entity.Player; import org.bukkit.entity.Tameable; import org.bukkit.entity.Vehicle; @@ -497,6 +491,7 @@ class PlayerEventHandler implements Listener if(category == CommandCategory.Whisper && args.length > 1) { //determine target player, might be NULL + @SuppressWarnings("deprecation") Player targetPlayer = GriefPrevention.instance.getServer().getPlayer(args[1]); //softmute feature @@ -522,7 +517,8 @@ class PlayerEventHandler implements Listener String logMessage = logMessageBuilder.toString(); - Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); + @SuppressWarnings("unchecked") + Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); for(Player onlinePlayer : players) { if(onlinePlayer.hasPermission("griefprevention.eavesdrop") && !onlinePlayer.equals(targetPlayer) && !onlinePlayer.equals(player)) @@ -758,7 +754,8 @@ class PlayerEventHandler implements Listener } //when a player successfully joins the server... - @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + @SuppressWarnings("deprecation") + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) void onPlayerJoin(PlayerJoinEvent event) { Player player = event.getPlayer(); @@ -840,7 +837,8 @@ class PlayerEventHandler implements Listener GriefPrevention.AddLogEntry("Auto-banned new player " + player.getName() + " because that account is using an IP address very recently used by banned player " + info.bannedAccountName + " (" + info.address.toString() + ").", CustomLogEntryTypes.AdminActivity); //notify any online ops - Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); + @SuppressWarnings("unchecked") + Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); for(Player otherPlayer : players) { if(otherPlayer.isOp()) @@ -1563,7 +1561,8 @@ class PlayerEventHandler implements Listener } //when a player interacts with the world - @EventHandler(priority = EventPriority.LOWEST) + @SuppressWarnings("deprecation") + @EventHandler(priority = EventPriority.LOWEST) void onPlayerInteract(PlayerInteractEvent event) { //not interested in left-click-on-air actions @@ -2490,7 +2489,8 @@ class PlayerEventHandler implements Listener private ConcurrentHashMap inventoryHolderCache = new ConcurrentHashMap(); private boolean isInventoryHolder(Block clickedBlock) { - Integer cacheKey = clickedBlock.getTypeId(); + @SuppressWarnings("deprecation") + Integer cacheKey = clickedBlock.getTypeId(); Boolean cachedValue = this.inventoryHolderCache.get(cacheKey); if(cachedValue != null) { diff --git a/src/me/ryanhamshire/GriefPrevention/PlayerKickBanTask.java b/src/me/ryanhamshire/GriefPrevention/PlayerKickBanTask.java index 09606d7..27ca2fb 100644 --- a/src/me/ryanhamshire/GriefPrevention/PlayerKickBanTask.java +++ b/src/me/ryanhamshire/GriefPrevention/PlayerKickBanTask.java @@ -18,9 +18,6 @@ package me.ryanhamshire.GriefPrevention; -import org.bukkit.BanList; -import org.bukkit.Bukkit; -import org.bukkit.BanList.Type; import org.bukkit.entity.Player; //kicks or bans a player diff --git a/src/me/ryanhamshire/GriefPrevention/RestoreNatureExecutionTask.java b/src/me/ryanhamshire/GriefPrevention/RestoreNatureExecutionTask.java index ff1f8e8..4776f69 100644 --- a/src/me/ryanhamshire/GriefPrevention/RestoreNatureExecutionTask.java +++ b/src/me/ryanhamshire/GriefPrevention/RestoreNatureExecutionTask.java @@ -55,7 +55,8 @@ class RestoreNatureExecutionTask implements Runnable this.player = player; } - @Override + @SuppressWarnings("deprecation") + @Override public void run() { //apply changes to the world, but ONLY to unclaimed blocks diff --git a/src/me/ryanhamshire/GriefPrevention/RestoreNatureProcessingTask.java b/src/me/ryanhamshire/GriefPrevention/RestoreNatureProcessingTask.java index cf74d03..22e604e 100644 --- a/src/me/ryanhamshire/GriefPrevention/RestoreNatureProcessingTask.java +++ b/src/me/ryanhamshire/GriefPrevention/RestoreNatureProcessingTask.java @@ -50,7 +50,8 @@ class RestoreNatureProcessingTask implements Runnable private ArrayList notAllowedToHang; //natural blocks which don't naturally hang in their air private ArrayList playerBlocks; //a "complete" list of player-placed blocks. MUST BE MAINTAINED as patches introduce more - public RestoreNatureProcessingTask(BlockSnapshot[][][] snapshots, int miny, Environment environment, Biome biome, Location lesserBoundaryCorner, Location greaterBoundaryCorner, int seaLevel, boolean aggressiveMode, boolean creativeMode, Player player) + @SuppressWarnings("deprecation") + public RestoreNatureProcessingTask(BlockSnapshot[][][] snapshots, int miny, Environment environment, Biome biome, Location lesserBoundaryCorner, Location greaterBoundaryCorner, int seaLevel, boolean aggressiveMode, boolean creativeMode, Player player) { this.snapshots = snapshots; this.miny = miny; @@ -149,7 +150,8 @@ class RestoreNatureProcessingTask implements Runnable GriefPrevention.instance.getServer().getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, task); } - private void removePlayerLeaves() + @SuppressWarnings("deprecation") + private void removePlayerLeaves() { if(this.seaLevel < 1) return; @@ -171,7 +173,8 @@ class RestoreNatureProcessingTask implements Runnable } //converts sandstone adjacent to sand to sand, and any other sandstone to air - private void removeSandstone() + @SuppressWarnings("deprecation") + private void removeSandstone() { for(int x = 1; x < snapshots.length - 1; x++) { @@ -210,7 +213,8 @@ class RestoreNatureProcessingTask implements Runnable } } - private void reduceStone() + @SuppressWarnings("deprecation") + private void reduceStone() { if(this.seaLevel < 1) return; @@ -257,7 +261,8 @@ class RestoreNatureProcessingTask implements Runnable } } - private void reduceLogs() + @SuppressWarnings("deprecation") + private void reduceLogs() { if(this.seaLevel < 1) return; @@ -295,7 +300,8 @@ class RestoreNatureProcessingTask implements Runnable } } - private void removePlayerBlocks() + @SuppressWarnings("deprecation") + private void removePlayerBlocks() { int miny = this.miny; if(miny < 1) miny = 1; @@ -317,7 +323,8 @@ class RestoreNatureProcessingTask implements Runnable } } - private void removeHanging() + @SuppressWarnings("deprecation") + private void removeHanging() { int miny = this.miny; if(miny < 1) miny = 1; @@ -343,7 +350,8 @@ class RestoreNatureProcessingTask implements Runnable } } - private void removeWallsAndTowers() + @SuppressWarnings("deprecation") + private void removeWallsAndTowers() { int [] excludedBlocksArray = new int [] { @@ -396,7 +404,8 @@ class RestoreNatureProcessingTask implements Runnable }while(changed); } - private void coverSurfaceStone() + @SuppressWarnings("deprecation") + private void coverSurfaceStone() { for(int x = 1; x < snapshots.length - 1; x++) { @@ -420,7 +429,8 @@ class RestoreNatureProcessingTask implements Runnable } } - private void fillHolesAndTrenches() + @SuppressWarnings("deprecation") + private void fillHolesAndTrenches() { ArrayList fillableBlocks = new ArrayList(); fillableBlocks.add(Material.AIR.getId()); @@ -478,7 +488,8 @@ class RestoreNatureProcessingTask implements Runnable }while(changed); } - private void fixWater() + @SuppressWarnings("deprecation") + private void fixWater() { int miny = this.miny; if(miny < 1) miny = 1; @@ -562,7 +573,8 @@ class RestoreNatureProcessingTask implements Runnable }while(changed); } - private void removeDumpedFluids() + @SuppressWarnings("deprecation") + private void removeDumpedFluids() { if(this.seaLevel < 1) return; @@ -586,7 +598,8 @@ class RestoreNatureProcessingTask implements Runnable } } - private int highestY(int x, int z, boolean ignoreLeaves) + @SuppressWarnings("deprecation") + private int highestY(int x, int z, boolean ignoreLeaves) { int y; for(y = snapshots[0].length - 1; y > 0; y--) @@ -607,7 +620,8 @@ class RestoreNatureProcessingTask implements Runnable return y; } - static ArrayList getPlayerBlocks(Environment environment, Biome biome) + @SuppressWarnings("deprecation") + static ArrayList getPlayerBlocks(Environment environment, Biome biome) { //NOTE on this list. why not make a list of natural blocks? //answer: better to leave a few player blocks than to remove too many natural blocks. remember we're "restoring nature" diff --git a/src/me/ryanhamshire/GriefPrevention/SecureClaimTask.java b/src/me/ryanhamshire/GriefPrevention/SecureClaimTask.java index bc17073..0bc7e94 100644 --- a/src/me/ryanhamshire/GriefPrevention/SecureClaimTask.java +++ b/src/me/ryanhamshire/GriefPrevention/SecureClaimTask.java @@ -43,7 +43,8 @@ class SecureClaimTask implements Runnable claim.doorsOpen = false; //eject bad guys - Collection onlinePlayers = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); + @SuppressWarnings("unchecked") + Collection onlinePlayers = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); for(Player player : onlinePlayers) { if(claim.contains(player.getLocation(), false, false) && claim.allowAccess(player) != null) diff --git a/src/me/ryanhamshire/GriefPrevention/Visualization.java b/src/me/ryanhamshire/GriefPrevention/Visualization.java index 6e840c5..5806dec 100644 --- a/src/me/ryanhamshire/GriefPrevention/Visualization.java +++ b/src/me/ryanhamshire/GriefPrevention/Visualization.java @@ -53,7 +53,8 @@ public class Visualization } //reverts a visualization by sending another block change list, this time with the real world block values - public static void Revert(Player player) + @SuppressWarnings("deprecation") + public static void Revert(Player player) { if(!player.isOnline()) return; @@ -125,7 +126,8 @@ public class Visualization //adds a claim's visualization to the current visualization //handy for combining several visualizations together, as when visualization a top level claim with several subdivisions inside //locality is a performance consideration. only create visualization blocks for around 100 blocks of the locality - private void addClaimElements(Claim claim, int height, VisualizationType visualizationType, Location locality) + @SuppressWarnings("deprecation") + private void addClaimElements(Claim claim, int height, VisualizationType visualizationType, Location locality) { Location smallXsmallZ = claim.getLesserBoundaryCorner(); Location bigXbigZ = claim.getGreaterBoundaryCorner(); diff --git a/src/me/ryanhamshire/GriefPrevention/VisualizationApplicationTask.java b/src/me/ryanhamshire/GriefPrevention/VisualizationApplicationTask.java index 4ece654..6351811 100644 --- a/src/me/ryanhamshire/GriefPrevention/VisualizationApplicationTask.java +++ b/src/me/ryanhamshire/GriefPrevention/VisualizationApplicationTask.java @@ -34,7 +34,8 @@ class VisualizationApplicationTask implements Runnable this.player = player; } - @Override + @SuppressWarnings("deprecation") + @Override public void run() { //for each element (=block) of the visualization diff --git a/src/me/ryanhamshire/GriefPrevention/events/ClaimDeletedEvent.java b/src/me/ryanhamshire/GriefPrevention/events/ClaimDeletedEvent.java index e636cbe..b691e0a 100644 --- a/src/me/ryanhamshire/GriefPrevention/events/ClaimDeletedEvent.java +++ b/src/me/ryanhamshire/GriefPrevention/events/ClaimDeletedEvent.java @@ -2,8 +2,6 @@ package me.ryanhamshire.GriefPrevention.events; import me.ryanhamshire.GriefPrevention.Claim; -import org.bukkit.entity.Player; -import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList;