Ejemplo n.º 1
0
 @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
 public void onBlockBurn(BlockBurnEvent event) {
   ZoneManager manager = m_plugin.getZoneManager();
   if (manager.zoneExists(event.getBlock().getLocation())) {
     event.setCancelled(true);
   }
 }
 @EventHandler(ignoreCancelled = true)
 public void onBlockBurn(BlockBurnEvent event) {
   Block block = event.getBlock();
   if (LotteryManager.isSignRegistered(block) || !checkBlockBroken(block)) {
     event.setCancelled(true);
     return;
   }
 }
Ejemplo n.º 3
0
 @Override
 public void onBlockBurn(BlockBurnEvent event) {
   if (event.isCancelled()) return;
   /* Call listeners */
   List<Listener> ll = event_handlers.get(event.getType());
   if (ll != null) {
     for (Listener l : ll) {
       ((BlockListener) l).onBlockBurn(event);
     }
   }
 }
Ejemplo n.º 4
0
  @SuppressWarnings("deprecation")
  @EventHandler(priority = EventPriority.LOW)
  public void onBlockBurn(BlockBurnEvent event) {
    Map map = Rixor.getRotation().getSlot().getMap();
    BlockState newState = event.getBlock().getState();
    newState.setData(new MaterialData(Material.AIR, (byte) 0));

    BlockChangeEvent change =
        new BlockChangeEvent(event, map, null, event.getBlock().getState(), newState);
    Rixor.callEvent(change);
  }
 /* (non-Javadoc)
  * @see org.bukkit.event.block.BlockListener#onBlockBurn(org.bukkit.event.block.BlockBurnEvent)
  */
 @EventHandler(priority = EventPriority.LOWEST)
 public void onBlockBurn(final BlockBurnEvent event) {
   if (!event.isCancelled()
       && (event.getBlock() != null)
       && BlockBurn.handleBlockBurn(event.getBlock())) {
     event.setCancelled(true);
     WXLogger.prettyLog(
         Level.FINE,
         false,
         "Cancelled BlockBurnEvent on " + event.getBlock().getWorld().getName());
   }
 }
Ejemplo n.º 6
0
 @EventHandler(priority = EventPriority.HIGH)
 public void onBlockBurnEvent(BlockBurnEvent event) {
   if (event.isCancelled()) {
     return;
   }
   Block block = event.getBlock();
   Set<Snitch> snitches = snitchManager.findSnitches(block.getWorld(), block.getLocation());
   for (Snitch snitch : snitches) {
     if (snitch.getGroup() != null) {
       continue;
     }
     plugin.getJaLogger().logSnitchBlockBurn(snitch, block);
   }
 }
 @EventHandler(priority = EventPriority.HIGH)
 public void onBlockBurn(BlockBurnEvent event) {
   if (!TotalFreedomMod.allowFireSpread) {
     event.setCancelled(true);
     return;
   }
 }
  @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
  public void onBlockBurn(final BlockBurnEvent event) {
    final ProtectHolder settings = prot.getSettings();

    if (settings.getData().getPrevent().isFirespread()) {
      event.setCancelled(true);
    }
  }
Ejemplo n.º 9
0
  /**
   * Called when a block is destroyed from burning
   *
   * @param event Relevant event details
   */
  @Override
  public void onBlockBurn(BlockBurnEvent event) {

    if (event.isCancelled()) {
      return;
    }

    ConfigurationManager cfg = plugin.getGlobalConfiguration();
    WorldConfiguration wcfg = cfg.get(event.getBlock().getWorld());

    if (wcfg.disableFireSpread) {
      event.setCancelled(true);
      return;
    }

    if (wcfg.fireSpreadDisableToggle) {
      event.setCancelled(true);
      return;
    }

    if (wcfg.disableFireSpreadBlocks.size() > 0) {
      Block block = event.getBlock();

      if (wcfg.disableFireSpreadBlocks.contains(block.getTypeId())) {
        event.setCancelled(true);
        return;
      }
    }

    if (wcfg.useRegions) {
      Block block = event.getBlock();
      Vector pt = toVector(block);
      RegionManager mgr = plugin.getGlobalRegionManager().get(block.getWorld());
      ApplicableRegionSet set = mgr.getApplicableRegions(pt);

      if (!set.allows(DefaultFlag.FIRE_SPREAD)) {
        event.setCancelled(true);
        return;
      }
    }
  }
Ejemplo n.º 10
0
 @EventHandler
 public void BlockBurnEvent(BlockBurnEvent event) {
   if (!arena.getRegion().isInside(event.getBlock().getLocation()) || arena.getEditMode()) return;
   if (arena.getArena().isInside(event.getBlock().getLocation()) && arena.isRunning()) return;
   event.setCancelled(true);
 }
  /*
   * Called when a block is destroyed from burning.
   */
  @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
  public void onBlockBurn(BlockBurnEvent event) {
    ConfigurationManager cfg = plugin.getGlobalStateManager();
    WorldConfiguration wcfg = cfg.get(event.getBlock().getWorld());

    if (cfg.activityHaltToggle) {
      event.setCancelled(true);
      return;
    }

    if (wcfg.disableFireSpread) {
      event.setCancelled(true);
      return;
    }

    if (wcfg.fireSpreadDisableToggle) {
      Block block = event.getBlock();
      event.setCancelled(true);
      checkAndDestroyAround(
          block.getWorld(), block.getX(), block.getY(), block.getZ(), BlockID.FIRE);
      return;
    }

    if (wcfg.disableFireSpreadBlocks.size() > 0) {
      Block block = event.getBlock();

      if (wcfg.disableFireSpreadBlocks.contains(block.getTypeId())) {
        event.setCancelled(true);
        checkAndDestroyAround(
            block.getWorld(), block.getX(), block.getY(), block.getZ(), BlockID.FIRE);
        return;
      }
    }

    if (wcfg.isChestProtected(event.getBlock())) {
      event.setCancelled(true);
      return;
    }

    if (wcfg.useRegions) {
      Block block = event.getBlock();
      int x = block.getX();
      int y = block.getY();
      int z = block.getZ();
      Vector pt = toVector(block);
      RegionManager mgr = plugin.getGlobalRegionManager().get(block.getWorld());
      ApplicableRegionSet set = mgr.getApplicableRegions(pt);

      if (!set.allows(DefaultFlag.FIRE_SPREAD)) {
        checkAndDestroyAround(block.getWorld(), x, y, z, BlockID.FIRE);
        event.setCancelled(true);
        return;
      }
    }
  }
Ejemplo n.º 12
0
 @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
 public void onBlockBurn(BlockBurnEvent event) {
   addToCheck(event.getBlock(), event.getBlock().getState());
 }
Ejemplo n.º 13
0
 @HawkEvent(dataType = DataType.BLOCK_BURN)
 public void onBlockBurn(BlockBurnEvent event) {
   DataManager.addEntry(new BlockEntry("Environment", DataType.BLOCK_BURN, event.getBlock()));
 }
Ejemplo n.º 14
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onBlockBurn(BlockBurnEvent event) {
   if (!event.isCancelled() && isLogging(event.getBlock().getWorld(), Logging.FIRE))
     consumer.queueBlockBreak("Fire", event.getBlock().getState());
 }
Ejemplo n.º 15
0
 @EventHandler
 public void onBlockBurn_Appliance(final BlockBurnEvent event) {
   if (MadeToBreak.appliances.contains(event.getBlock().getTypeId())) {
     plugin.l.remove(event.getBlock().getLocation());
   }
 }
 @Override
 public void onBlockBurn(BlockBurnEvent event) {
   manager.burnBlock(event.getBlock());
 }