コード例 #1
0
  @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
  public void onBlockGrow(final BlockGrowEvent event) {
    Block b = event.getBlock();

    if (PlotManager.isPlotWorld(b)) {
      String id = PlotManager.getPlotId(b.getLocation());

      if (id.equalsIgnoreCase("")) {
        event.setCancelled(true);
      }
    }
  }
コード例 #2
0
 @EventHandler
 public void BlockGrowEvent(BlockGrowEvent event) {
   if (!arena.getRegion().isInside(event.getBlock().getLocation()) || arena.getEditMode()) return;
   event.setCancelled(true);
 }
コード例 #3
0
 @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
 public void onBlockGrow(BlockGrowEvent event) {
   addToCheck(event.getBlock(), event.getBlock().getState());
 }