remove all suppressions of deprecation warnings
This commit is contained in:
parent
4ce981d63a
commit
ac5a666b8d
|
|
@ -897,7 +897,7 @@ public class Claim
|
|||
return thisCorner.getWorld().getName().compareTo(otherCorner.getWorld().getName()) < 0;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
long getPlayerInvestmentScore()
|
||||
{
|
||||
//decide which blocks will be considered player placed
|
||||
|
|
|
|||
|
|
@ -1126,7 +1126,7 @@ public abstract class DataStore
|
|||
//if the claim should be opened to looting
|
||||
if (grantAccess)
|
||||
{
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
Player winner = GriefPrevention.instance.getServer().getPlayer(winnerName);
|
||||
if (winner != null)
|
||||
{
|
||||
|
|
@ -1145,9 +1145,9 @@ public abstract class DataStore
|
|||
//if the siege ended due to death, transfer inventory to winner
|
||||
if (drops != null)
|
||||
{
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
Player winner = GriefPrevention.instance.getServer().getPlayer(winnerName);
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
Player loser = GriefPrevention.instance.getServer().getPlayer(loserName);
|
||||
if (winner != null && loser != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -232,7 +232,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);
|
||||
Item item = block.getWorld().dropItem(entity.getLocation(), itemStack);
|
||||
item.setVelocity(new Vector());
|
||||
|
|
@ -307,7 +307,7 @@ public class EntityEventHandler implements Listener
|
|||
this.handleExplosion(explodeEvent.getBlock().getLocation(), null, explodeEvent.blockList());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
void handleExplosion(Location location, Entity entity, List<Block> blocks)
|
||||
{
|
||||
//only applies to claims-enabled worlds
|
||||
|
|
@ -682,7 +682,7 @@ public class EntityEventHandler implements Listener
|
|||
{
|
||||
//handle it just like we would an entity damge by entity event, except don't send player messages to avoid double messages
|
||||
//in cases like attacking with a flame sword or flame arrow, which would ALSO trigger the direct damage event handler
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
EntityDamageByEntityEvent eventWrapper = new EntityDamageByEntityEvent(event.getCombuster(), event.getEntity(), DamageCause.FIRE_TICK, event.getDuration());
|
||||
this.handleEntityDamageEvent(eventWrapper, false);
|
||||
event.setCancelled(eventWrapper.isCancelled());
|
||||
|
|
|
|||
|
|
@ -1002,7 +1002,6 @@ public class GriefPrevention extends JavaPlugin
|
|||
}
|
||||
|
||||
//handles slash commands
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)
|
||||
{
|
||||
|
||||
|
|
@ -3174,7 +3173,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
public OfflinePlayer resolvePlayerByName(String name)
|
||||
{
|
||||
//try online players first
|
||||
|
|
@ -3541,7 +3540,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
}
|
||||
}
|
||||
|
||||
@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
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ class PlayerEventHandler implements Listener
|
|||
if (category == CommandCategory.Whisper && args.length > 1)
|
||||
{
|
||||
//determine target player, might be NULL
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
Player targetPlayer = instance.getServer().getPlayer(args[1]);
|
||||
|
||||
//softmute feature
|
||||
|
|
@ -666,7 +666,7 @@ class PlayerEventHandler implements Listener
|
|||
}
|
||||
|
||||
//when a player successfully joins the server...
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||
void onPlayerJoin(PlayerJoinEvent event)
|
||||
{
|
||||
|
|
@ -2673,7 +2673,7 @@ class PlayerEventHandler implements Listener
|
|||
|
||||
private boolean isInventoryHolder(Block clickedBlock)
|
||||
{
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
Material cacheKey = clickedBlock.getType();
|
||||
Boolean cachedValue = this.inventoryHolderCache.get(cacheKey);
|
||||
if (cachedValue != null)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class RestoreNatureExecutionTask implements Runnable
|
|||
this.player = player;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
private ArrayList<Material> notAllowedToHang; //natural blocks which don't naturally hang in their air
|
||||
private ArrayList<Material> playerBlocks; //a "complete" list of player-placed blocks. MUST BE MAINTAINED as patches introduce more
|
||||
|
||||
@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;
|
||||
|
|
@ -165,7 +165,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
GriefPrevention.instance.getServer().getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, task);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void removePlayerLeaves()
|
||||
{
|
||||
if (this.seaLevel < 1) return;
|
||||
|
|
@ -187,7 +187,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
}
|
||||
|
||||
//converts sandstone adjacent to sand to sand, and any other sandstone to air
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void removeSandstone()
|
||||
{
|
||||
for (int x = 1; x < snapshots.length - 1; x++)
|
||||
|
|
@ -227,7 +227,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void reduceStone()
|
||||
{
|
||||
if (this.seaLevel < 1) return;
|
||||
|
|
@ -275,7 +275,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void reduceLogs()
|
||||
{
|
||||
if (this.seaLevel < 1) return;
|
||||
|
|
@ -313,7 +313,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void removePlayerBlocks()
|
||||
{
|
||||
int miny = this.miny;
|
||||
|
|
@ -337,7 +337,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void removeHanging()
|
||||
{
|
||||
int miny = this.miny;
|
||||
|
|
@ -364,7 +364,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void removeWallsAndTowers()
|
||||
{
|
||||
Material[] excludedBlocksArray = new Material[]
|
||||
|
|
@ -427,7 +427,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
} while (changed);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void coverSurfaceStone()
|
||||
{
|
||||
for (int x = 1; x < snapshots.length - 1; x++)
|
||||
|
|
@ -452,7 +452,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void fillHolesAndTrenches()
|
||||
{
|
||||
ArrayList<Material> fillableBlocks = new ArrayList<Material>();
|
||||
|
|
@ -510,7 +510,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
} while (changed);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void fixWater()
|
||||
{
|
||||
int miny = this.miny;
|
||||
|
|
@ -597,7 +597,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
} while (changed);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void removeDumpedFluids()
|
||||
{
|
||||
if (this.seaLevel < 1) return;
|
||||
|
|
@ -621,7 +621,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private int highestY(int x, int z, boolean ignoreLeaves)
|
||||
{
|
||||
int y;
|
||||
|
|
@ -641,7 +641,7 @@ class RestoreNatureProcessingTask implements Runnable
|
|||
return y;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
static ArrayList<Material> getPlayerBlocks(Environment environment, Biome biome)
|
||||
{
|
||||
//NOTE on this list. why not make a list of natural blocks?
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class Visualization
|
|||
}
|
||||
|
||||
//reverts a visualization by sending another block change list, this time with the real world block values
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
public static void Revert(Player player)
|
||||
{
|
||||
if (!player.isOnline()) return;
|
||||
|
|
@ -129,7 +129,7 @@ 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
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
private void addClaimElements(Claim claim, int height, VisualizationType visualizationType, Location locality)
|
||||
{
|
||||
Location smallXsmallZ = claim.getLesserBoundaryCorner();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class VisualizationApplicationTask implements Runnable
|
|||
this.player = player;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user