package me.otisdiver.otisarena.event;

import org.bukkit.GameMode;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.EventHandler;
import org.bukkit.event.inventory.InventoryOpenEvent;
import org.bukkit.event.player.PlayerInteractEvent;

import me.otisdiver.otisarena.OtisArena;

public class WorldGuard extends EasyListener {

    /** WorldGuard prevents players from editing the world.
     * 
     * @param main instance of JavaPlugin
     */
    public WorldGuard(OtisArena main) {
        super(main);
    }
    
    private void event(Player player, Cancellable e) {
        // if the player isn't in creative, cancel the event
        if (!player.getGameMode().equals(GameMode.CREATIVE)) {
            e.setCancelled(true);
        }
    }
    
    @EventHandler
    public void onInteract(PlayerInteractEvent e) {
        event(e.getPlayer(), e);
    }
    
    @EventHandler
    public void onInvOpen(InventoryOpenEvent e) {
        if (!(e.getPlayer() instanceof Player)) return;
        Player player = (Player) e.getPlayer();
        event(player, e);
    }

}

@@ -196,83 +196,174 @@
 ent.
-inventory.InventoryOpenEvent;%0Aimport org.bukkit.event.player.PlayerInteract
+block.BlockBreakEvent;%0Aimport org.bukkit.event.block.BlockExplodeEvent;%0Aimport org.bukkit.event.block.BlockPlaceEvent;%0Aimport org.bukkit.event.inventory.InventoryOpen
 Even
@@ -920,31 +920,141 @@
 d on
-Interact(PlayerInteract
+BlockBreak(BlockBreakEvent e) %7B%0A        event(e.getPlayer(), e);%0A    %7D%0A    %0A    @EventHandler%0A    public void onBlockPlace(BlockPlace
 Even

fix PlayerInteractEvent usage this event covers a lot more than just block edits!