Ejemplo n.º 1
0
 @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
 public void onBlockIgnite(BlockIgniteEvent event) {
   ZoneManager manager = m_plugin.getZoneManager();
   if (manager.zoneExists(event.getBlock().getLocation())) {
     if (!manager
         .getZone(event.getBlock().getLocation())
         .canPlayerUse(event.getPlayer(), event.getBlock())) {
       event.setCancelled(true);
       sendMessageNoSpam(event.getPlayer(), UI.getMessage("NoBuild"));
     }
   }
 }