コード例 #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);
   }
 }
コード例 #2
0
 @EventHandler(ignoreCancelled = true)
 public void onBlockBurn(BlockBurnEvent event) {
   Block block = event.getBlock();
   if (LotteryManager.isSignRegistered(block) || !checkBlockBroken(block)) {
     event.setCancelled(true);
     return;
   }
 }
コード例 #3
0
ファイル: DynmapPlugin.java プロジェクト: CovertHoax/dynmap
 @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);
     }
   }
 }
コード例 #4
0
ファイル: FilterEvents.java プロジェクト: Prodigy4532/Rixor
  @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);
  }
コード例 #5
0
 /* (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());
   }
 }
コード例 #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);
   }
 }
コード例 #7
0
 @EventHandler(priority = EventPriority.HIGH)
 public void onBlockBurn(BlockBurnEvent event) {
   if (!TotalFreedomMod.allowFireSpread) {
     event.setCancelled(true);
     return;
   }
 }
コード例 #8
0
  @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);
    }
  }
コード例 #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;
      }
    }
  }
コード例 #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);
 }
コード例 #11
0
  /*
   * 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;
      }
    }
  }
コード例 #12
0
 @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
 public void onBlockBurn(BlockBurnEvent event) {
   addToCheck(event.getBlock(), event.getBlock().getState());
 }
コード例 #13
0
 @HawkEvent(dataType = DataType.BLOCK_BURN)
 public void onBlockBurn(BlockBurnEvent event) {
   DataManager.addEntry(new BlockEntry("Environment", DataType.BLOCK_BURN, event.getBlock()));
 }
コード例 #14
0
ファイル: BlockBurnLogging.java プロジェクト: nphyx/LogBlock
 @EventHandler(priority = EventPriority.MONITOR)
 public void onBlockBurn(BlockBurnEvent event) {
   if (!event.isCancelled() && isLogging(event.getBlock().getWorld(), Logging.FIRE))
     consumer.queueBlockBreak("Fire", event.getBlock().getState());
 }
コード例 #15
0
 @EventHandler
 public void onBlockBurn_Appliance(final BlockBurnEvent event) {
   if (MadeToBreak.appliances.contains(event.getBlock().getTypeId())) {
     plugin.l.remove(event.getBlock().getLocation());
   }
 }
コード例 #16
0
 @Override
 public void onBlockBurn(BlockBurnEvent event) {
   manager.burnBlock(event.getBlock());
 }