title: How do I declare a projectile and cancel the damage from it with this event code in Bukkit
body: <p>I need to know how to declare a projectile inside the if statement using the getCause() conditional.</p>
  
  <p>Then, I need to know how to cancel the damage from that projectile if the players are in the same gang.</p>
  
  <p>Please give me an explanation on how to do with along with some example code please!</p>
  
  <p>Here is my event.</p>
  
  <pre><code>@EventHandler
  public void onEntityDamage(EntityDamageByEntityEvent event){
      if(event.getEntity() instanceof Player){
          Player damaged = (Player) event.getEntity();
          String DUUID = damaged.getUniqueId().toString().toLowerCase();
  
          if(event.getCause() == DamageCause.PROJECTILE){
  
              //I NEED THE CODE TO PUT IN HERE
  
          }
  
          if(event.getDamager() instanceof Player){
              Player damager = (Player) event.getDamager();
              String DRUUID = damager.getUniqueId().toString().toLowerCase();
  
              if(MinecraftGTA.config.getString(DRUUID + ".Gang").equalsIgnoreCase(MinecraftGTA.config.getString(DUUID + ".Gang"))){
                  event.setCancelled(true);
              }
          }
      }
  }
  </code></pre>