Fixed the loader block is duped when breaking it (#102)

This commit is contained in:
OmerBenGera 2024-06-22 11:52:10 +03:00
parent eeb2f4957c
commit 0cc90156a8

View File

@ -66,9 +66,11 @@ public final class BlocksListener implements Listener {
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onLoaderBreak(BlockBreakEvent e) {
if (handleLoaderBreak(e.getBlock(), e.getPlayer().getGameMode() != GameMode.CREATIVE))
if (handleLoaderBreak(e.getBlock(), e.getPlayer().getGameMode() != GameMode.CREATIVE)) {
e.setCancelled(true);
Locale.BROKE_LOADER.send(e.getPlayer());
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onLoaderExplode(EntityExplodeEvent e) {