Skip to content

Commit

Permalink
Listen on highest level
Browse files Browse the repository at this point in the history
  • Loading branch information
HaHaWTH committed Jan 3, 2025
1 parent 4dbc3dc commit 3628d08
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import io.wdsj.hybridfix.config.Settings;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockExplodeEvent;
import org.bukkit.event.entity.EntityExplodeEvent;

public class ExplodeListener implements Listener {
@EventHandler
@EventHandler(priority = EventPriority.HIGHEST)
public void onEntityExplode(EntityExplodeEvent event) {
String worldName = event.getEntity().getWorld().getName();
for (String s : Settings.bukkitPluginConfig.antiExplodeWorlds) {
Expand All @@ -18,7 +19,7 @@ public void onEntityExplode(EntityExplodeEvent event) {
}
}

@EventHandler
@EventHandler(priority = EventPriority.HIGHEST)
public void onBlockExplode(BlockExplodeEvent event) {
String worldName = event.getBlock().getWorld().getName();
for (String s : Settings.bukkitPluginConfig.antiExplodeWorlds) {
Expand Down

0 comments on commit 3628d08

Please sign in to comment.