diff --git a/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java b/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java index 723066e55..b254dd7fb 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java @@ -7,10 +7,8 @@ import me.moomoo.anarchyexploitfixes.utils.LogUtils; import org.bukkit.Chunk; import org.bukkit.Material; -import org.bukkit.SkullType; import org.bukkit.World; import org.bukkit.block.Block; -import org.bukkit.block.Skull; import java.util.HashSet; import java.util.List; @@ -95,12 +93,7 @@ private void run() { final Material blockType = block.getType(); if (!blocksToRemove.contains(blockType)) continue; - if (blockType.equals(Material.PLAYER_HEAD)) { - Skull skull = (Skull) block.getState(); - if (skull.hasOwner() || skull.getSkullType().equals(SkullType.PLAYER)) { - block.setType(Material.AIR, false); - } - } else if (blockType.equals(Material.BEDROCK)) { + if (blockType.equals(Material.BEDROCK)) { if (y > minY + 4) { // offset to not delete natural bedrock floor if (inNether) { // offset to not delete bedrock ceiling @@ -109,9 +102,10 @@ private void run() { block.setType(Material.AIR, false); } } - } else { - block.setType(Material.AIR, false); + continue; } + + block.setType(Material.AIR, false); } } } diff --git a/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java b/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java index 6ace959ed..3d98c2ffe 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java @@ -94,14 +94,7 @@ private void onChunkLoad(ChunkLoadEvent event) { for (int y = minY; y < maxY; y++) { Block block = chunk.getBlock(x, y, z); final Material blockType = block.getType(); - - if (!blocksToRemove.contains(blockType)) - continue; - - if (blockType.equals(Material.PLAYER_HEAD)) { - block.setType(Material.AIR, false); - continue; - } + if (!blocksToRemove.contains(blockType)) continue; if (blockType.equals(Material.BEDROCK)) { if (y > minY+4) { // offset to not delete natural bedrock floor