package in.twizmwaz.cardinal.module.modules.worldFreeze;

import in.twizmwaz.cardinal.match.Match;
import in.twizmwaz.cardinal.match.MatchState;
import in.twizmwaz.cardinal.module.Module;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.entity.EntityExplodeEvent;

public class WorldFreeze implements Module {
    
    private final Match match;
    
    protected WorldFreeze(Match match) {
        this.match = match;
    }
    
    @Override
    public void unload() {
        HandlerList.unregisterAll(this);
    }

    @EventHandler
    public void onLiquidFlow(BlockFromToEvent event) {
        if (match.getState() != MatchState.PLAYING) {
            event.setCancelled(true);
        }
    }

    @EventHandler
    public void onExplode(EntityExplodeEvent event) {
        if (match.getState() != MatchState.PLAYING) {
            event.setCancelled(true);
        }
    }
    
}

@@ -286,32 +286,17 @@
 t.block.
-BlockFromToEvent
+*
 ;%0Aimport
@@ -606,32 +606,32 @@
   @EventHandler%0A
-
     public void 
@@ -772,24 +772,1499 @@
      %7D%0A    %7D
+%0A    %0A    @EventHandler%0A    public void onBlockBurn(BlockBurnEvent event) %7B%0A        if (match.getState() != MatchState.PLAYING) %7B%0A            event.setCancelled(true);%0A        %7D%0A    %7D%0A%0A    @EventHandler%0A    public void onBlockDispense(BlockDispenseEvent event) %7B%0A        if (match.getState() != MatchState.PLAYING) %7B%0A            event.setCancelled(true);%0A        %7D%0A    %7D%0A%0A    @EventHandler%0A    public void onBlockDispense(BlockDispenseEntityEvent event) %7B%0A        if (match.getState() != MatchState.PLAYING) %7B%0A            event.setCancelled(true);%0A        %7D%0A    %7D%0A    %0A    @EventHandler%0A    public void onBlockFade(BlockFadeEvent event) %7B%0A        if (match.getState() != MatchState.PLAYING) %7B%0A            event.setCancelled(true);%0A        %7D%0A    %7D%0A%0A    @EventHandler%0A    public void onBlockForm(BlockFormEvent event) %7B%0A        if (match.getState() != MatchState.PLAYING) %7B%0A            event.setCancelled(true);%0A        %7D%0A    %7D%0A%0A    @EventHandler%0A    public void onBlockGrow(BlockGrowEvent event) %7B%0A        if (match.getState() != MatchState.PLAYING) %7B%0A            event.setCancelled(true);%0A        %7D%0A    %7D%0A    %0A    @EventHandler%0A    public void onBlockIgnite(BlockIgniteEvent event) %7B%0A        if (match.getState() != MatchState.PLAYING) %7B%0A            event.setCancelled(true);%0A        %7D%0A    %7D%0A%0A    @EventHandler%0A    public void onBlockPysics(BlockPhysicsEvent event) %7B%0A        if (match.getState() != MatchState.PLAYING) %7B%0A            event.setCancelled(true);%0A        %7D%0A    %7D
 %0A%0A    @Event

Add more events to WorldFreeze