mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	@@ -240,7 +240,7 @@ public class PlayerListener implements Listener {
 | 
				
			|||||||
                return;
 | 
					                return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            case IN_GROUND:
 | 
					            case IN_GROUND:
 | 
				
			||||||
                Block block = player.getTargetBlock((HashSet<Byte>) null, 100);
 | 
					                Block block = player.getTargetBlock((HashSet<Material>) null, 100);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (fishingManager.canIceFish(block)) {
 | 
					                if (fishingManager.canIceFish(block)) {
 | 
				
			||||||
                    event.setCancelled(true);
 | 
					                    event.setCancelled(true);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -104,7 +104,7 @@ public class FishingManager extends SkillManager {
 | 
				
			|||||||
            vehicle.remove();
 | 
					            vehicle.remove();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        player.teleport(player.getTargetBlock((HashSet<Byte>) null, 100).getLocation(), TeleportCause.PLUGIN);
 | 
					        player.teleport(player.getTargetBlock((HashSet<Material>) null, 100).getLocation(), TeleportCause.PLUGIN);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        String unleashMessage = AdvancedConfig.getInstance().getPlayerUnleashMessage();
 | 
					        String unleashMessage = AdvancedConfig.getInstance().getPlayerUnleashMessage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -167,7 +167,7 @@ public class FishingManager extends SkillManager {
 | 
				
			|||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        Block targetBlock = getPlayer().getTargetBlock((HashSet<Byte>) BlockUtils.getTransparentBlocks(), 100);
 | 
					        Block targetBlock = getPlayer().getTargetBlock((HashSet<Material>) BlockUtils.getTransparentBlocks(), 100);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!targetBlock.isLiquid()) {
 | 
					        if (!targetBlock.isLiquid()) {
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -94,7 +94,7 @@ public class MiningManager extends SkillManager {
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public void remoteDetonation() {
 | 
					    public void remoteDetonation() {
 | 
				
			||||||
        Player player = getPlayer();
 | 
					        Player player = getPlayer();
 | 
				
			||||||
        Block targetBlock = player.getTargetBlock((HashSet<Byte>) BlockUtils.getTransparentBlocks(), BlastMining.MAXIMUM_REMOTE_DETONATION_DISTANCE);
 | 
					        Block targetBlock = player.getTargetBlock((HashSet<Material>) BlockUtils.getTransparentBlocks(), BlastMining.MAXIMUM_REMOTE_DETONATION_DISTANCE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (targetBlock.getType() != Material.TNT || !EventUtils.simulateBlockBreak(targetBlock, player, true) || !blastMiningCooldownOver()) {
 | 
					        if (targetBlock.getType() != Material.TNT || !EventUtils.simulateBlockBreak(targetBlock, player, true) || !blastMiningCooldownOver()) {
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -305,12 +305,12 @@ public final class BlockUtils {
 | 
				
			|||||||
     *
 | 
					     *
 | 
				
			||||||
     * @return HashSet with the IDs of every transparent block
 | 
					     * @return HashSet with the IDs of every transparent block
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static HashSet<Byte> getTransparentBlocks() {
 | 
					    public static HashSet<Material> getTransparentBlocks() {
 | 
				
			||||||
        HashSet<Byte> transparentBlocks = new HashSet<Byte>();
 | 
					        HashSet<Material> transparentBlocks = new HashSet<Material>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for (Material material : Material.values()) {
 | 
					        for (Material material : Material.values()) {
 | 
				
			||||||
            if (material.isTransparent()) {
 | 
					            if (material.isTransparent()) {
 | 
				
			||||||
                transparentBlocks.add((byte) material.getId());
 | 
					                transparentBlocks.add(material);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user