Skip to content

Commit

Permalink
Remove sponge after particles config
Browse files Browse the repository at this point in the history
  • Loading branch information
MetallicGoat committed Dec 18, 2024
1 parent 7a427f6 commit df6e83c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public class MainConfig {
}
)
public static boolean sponge_particles_enabled = true;
@Config public static boolean sponge_particles_remove_sponge_after_complete = true;

@Config(
description = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ public void run() {
radius++;
}

@Override
public void cancel() {
if (MainConfig.sponge_particles_remove_sponge_after_complete
&& block.getType().name().contains("SPONGE")) { // SPONGE or WET_SPONGE (also changes across versions)

block.setType(Material.AIR);
}

super.cancel();
}

public List<Location> getParticles(Location start, int radius) {
final List<Location> locations = new ArrayList<>();

Expand Down

0 comments on commit df6e83c

Please sign in to comment.