Skip to content

Commit

Permalink
Wind charge cannot blow up blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
xKumorio committed Aug 9, 2024
1 parent 1068ef9 commit 6cf0a5b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.xginko.aef.modules.lagpreventions;

import com.cryptomorin.xseries.XEntityType;
import com.destroystokyo.paper.MaterialTags;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
Expand All @@ -23,6 +24,8 @@
import java.util.Set;
import java.util.stream.Collectors;

import static org.bukkit.entity.EntityType.WIND_CHARGE;

public class StashExplosions extends AEFModule implements Listener {

private final Cache<ChunkUID, Integer> containerExplosions;
Expand Down Expand Up @@ -114,6 +117,7 @@ private void onBlockExplode(BlockExplodeEvent event) {

@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
private void onEntityExplode(EntityExplodeEvent event) {
if (event.getEntityType().equals(XEntityType.WIND_CHARGE.get())) return;
handleExplosion(event.getEntity().getChunk(), event.blockList());
}
}

0 comments on commit 6cf0a5b

Please sign in to comment.