Add handler

This commit is contained in:
Mathieu Strypsteen 2024-09-22 15:50:00 +02:00
parent eb42f29d5b
commit a855e61bcf

View file

@ -1,5 +1,6 @@
package gent.zeus.mc13dtl.events.catalog; package gent.zeus.mc13dtl.events.catalog;
import gent.zeus.mc13dtl.MC13DTL;
import gent.zeus.mc13dtl.events.Difficulty; import gent.zeus.mc13dtl.events.Difficulty;
import gent.zeus.mc13dtl.events.Event; import gent.zeus.mc13dtl.events.Event;
import org.bukkit.Material; import org.bukkit.Material;
@ -25,6 +26,9 @@ public class MineEvent extends Event {
@EventHandler @EventHandler
public void onBlockBreak(BlockBreakEvent event) { public void onBlockBreak(BlockBreakEvent event) {
if (MC13DTL.board.getPlayers(team).contains(event.getPlayer()) && event.getBlock().getType() == block) {
eventSuccess();
}
} }
@Override @Override