diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index 8f67f7914..d2ab93e87 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -240,7 +240,7 @@ public class PlayerListener implements Listener { return; case IN_GROUND: - Block block = player.getTargetBlock((HashSet) null, 100); + Block block = player.getTargetBlock((HashSet) null, 100); if (fishingManager.canIceFish(block)) { event.setCancelled(true); diff --git a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java index 425239960..6c46047b1 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -104,7 +104,7 @@ public class FishingManager extends SkillManager { vehicle.remove(); } - player.teleport(player.getTargetBlock((HashSet) null, 100).getLocation(), TeleportCause.PLUGIN); + player.teleport(player.getTargetBlock((HashSet) null, 100).getLocation(), TeleportCause.PLUGIN); String unleashMessage = AdvancedConfig.getInstance().getPlayerUnleashMessage(); @@ -167,7 +167,7 @@ public class FishingManager extends SkillManager { return false; } - Block targetBlock = getPlayer().getTargetBlock((HashSet) BlockUtils.getTransparentBlocks(), 100); + Block targetBlock = getPlayer().getTargetBlock((HashSet) BlockUtils.getTransparentBlocks(), 100); if (!targetBlock.isLiquid()) { return false; diff --git a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java index 62701aca0..0d073af46 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -94,7 +94,7 @@ public class MiningManager extends SkillManager { */ public void remoteDetonation() { Player player = getPlayer(); - Block targetBlock = player.getTargetBlock((HashSet) BlockUtils.getTransparentBlocks(), BlastMining.MAXIMUM_REMOTE_DETONATION_DISTANCE); + Block targetBlock = player.getTargetBlock((HashSet) BlockUtils.getTransparentBlocks(), BlastMining.MAXIMUM_REMOTE_DETONATION_DISTANCE); if (targetBlock.getType() != Material.TNT || !EventUtils.simulateBlockBreak(targetBlock, player, true) || !blastMiningCooldownOver()) { return; diff --git a/src/main/java/com/gmail/nossr50/util/BlockUtils.java b/src/main/java/com/gmail/nossr50/util/BlockUtils.java index d54e04808..3f3d10e83 100644 --- a/src/main/java/com/gmail/nossr50/util/BlockUtils.java +++ b/src/main/java/com/gmail/nossr50/util/BlockUtils.java @@ -305,12 +305,12 @@ public final class BlockUtils { * * @return HashSet with the IDs of every transparent block */ - public static HashSet getTransparentBlocks() { - HashSet transparentBlocks = new HashSet(); + public static HashSet getTransparentBlocks() { + HashSet transparentBlocks = new HashSet(); for (Material material : Material.values()) { if (material.isTransparent()) { - transparentBlocks.add((byte) material.getId()); + transparentBlocks.add(material); } }