diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java index 9ad36a72..e42e6c8b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java @@ -56,12 +56,13 @@ public class CmdFactionsSeeChunk extends FCommand msg("Visualized %s", chunk.toString(PSFormatHumanSpace.get())); } + @SuppressWarnings("deprecation") public static void showPillar(Player player, World world, int blockX, int blockZ) { for (int blockY = 0; blockY < world.getMaxHeight(); blockY++) { Location loc = new Location(world, blockX, blockY, blockZ); - if (loc.getBlock().getTypeId() != 0) continue; + if (loc.getBlock().getType() != Material.AIR) continue; int typeId = blockY % 5 == 0 ? Material.GLOWSTONE.getId() : Material.GLASS.getId(); VisualizeUtil.addLocation(player, loc, typeId); } diff --git a/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java b/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java index 24971ea2..16574323 100644 --- a/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java +++ b/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java @@ -41,6 +41,7 @@ public class FactionsListenerExploit implements Listener // OBSIDIAN GENERATORS // -------------------------------------------- // + @SuppressWarnings("deprecation") @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void obsidianGenerators(BlockFromToEvent event) { @@ -52,7 +53,7 @@ public class FactionsListenerExploit implements Listener int target = block.getTypeId(); if ((target == 55 || target == 132) && (source == 0 || source == 10 || source == 11)) { - block.setTypeId(0); + block.setType(Material.AIR); } } @@ -106,6 +107,7 @@ public class FactionsListenerExploit implements Listener // this optional change below provides workaround for waterwalling providing perfect protection, // and makes cheap (non-obsidian) TNT cannons require minor maintenance between shots + @SuppressWarnings("deprecation") @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void tntWaterlog(EntityExplodeEvent event) { diff --git a/src/com/massivecraft/factions/listeners/FactionsListenerMain.java b/src/com/massivecraft/factions/listeners/FactionsListenerMain.java index 74891833..256afc66 100644 --- a/src/com/massivecraft/factions/listeners/FactionsListenerMain.java +++ b/src/com/massivecraft/factions/listeners/FactionsListenerMain.java @@ -688,7 +688,7 @@ public class FactionsListenerMain implements Listener public void blockFireSpread(BlockSpreadEvent event) { // If fire is spreading ... - if (event.getNewState().getTypeId() != 51) return; + if (event.getNewState().getType() != Material.FIRE) return; // ... consider blocking it. blockFireSpread(event.getBlock(), event); diff --git a/src/com/massivecraft/factions/util/VisualizeUtil.java b/src/com/massivecraft/factions/util/VisualizeUtil.java index cf8213ff..d4d23521 100644 --- a/src/com/massivecraft/factions/util/VisualizeUtil.java +++ b/src/com/massivecraft/factions/util/VisualizeUtil.java @@ -37,12 +37,14 @@ public class VisualizeUtil // SINGLE // -------------------------------------------- // + @SuppressWarnings("deprecation") public static void addLocation(Player player, Location location, int typeId, byte data) { getPlayerLocations(player).add(location); player.sendBlockChange(location, typeId, data); } + @SuppressWarnings("deprecation") public static void addLocation(Player player, Location location, int typeId) { getPlayerLocations(player).add(location); @@ -53,6 +55,7 @@ public class VisualizeUtil // MANY // -------------------------------------------- // + @SuppressWarnings("deprecation") public static void addLocations(Player player, Map locationMaterialIds) { Set ploc = getPlayerLocations(player); @@ -63,6 +66,7 @@ public class VisualizeUtil } } + @SuppressWarnings("deprecation") public static void addLocations(Player player, Collection locations, int typeId) { Set ploc = getPlayerLocations(player); @@ -73,6 +77,7 @@ public class VisualizeUtil } } + @SuppressWarnings("deprecation") public static void addBlocks(Player player, Collection blocks, int typeId) { Set ploc = getPlayerLocations(player); @@ -88,6 +93,7 @@ public class VisualizeUtil // CLEAR // -------------------------------------------- // + @SuppressWarnings("deprecation") public static void clear(Player player) { Set locations = getPlayerLocations(player);