Program: 33963
Project: 33963
Buggy source:
/** 
 * This method protects players from PVP if it is not allowed and from arrows fired by other players
 * @param e
 */
@EventHandler(priority=EventPriority.LOW,ignoreCancelled=true) public void onEntityDamage(final EntityDamageByEntityEvent e){
  if (DEBUG) {
    plugin.getLogger().info(e.getEventName());
    plugin.getLogger().info("String_Node_Str" + e.getDamager().toString());
    plugin.getLogger().info("String_Node_Str" + e.getEntityType());
    plugin.getLogger().info("String_Node_Str" + e.getEntity());
  }
  if (!inWorld(e.getEntity())) {
    return;
  }
  Island island=plugin.getGrid().getProtectedIslandAt(e.getEntity().getLocation());
  boolean inNether=false;
  if (e.getEntity().getWorld().equals(ASkyBlock.getNetherWorld())) {
    inNether=true;
  }
  if (!Settings.allowTNTDamage && e.getDamager().getType().equals(EntityType.PRIMED_TNT)) {
    e.setCancelled(true);
    return;
  }
  if (island != null && island.isSpawn() && e.getDamager().getType().equals(EntityType.CREEPER) && Settings.allowSpawnCreeperPain) {
    return;
  }
  if (!Settings.allowCreeperDamage && e.getDamager().getType().equals(EntityType.CREEPER) && !(e.getEntity() instanceof Player)) {
    e.setCancelled(true);
    return;
  }
  if (!Settings.allowCreeperGriefing && e.getDamager().getType().equals(EntityType.CREEPER)) {
    Creeper creeper=(Creeper)e.getDamager();
    if (creeper.getTarget() instanceof Player) {
      Player target=(Player)creeper.getTarget();
      if (!plugin.getGrid().locationIsOnIsland(target,e.getEntity().getLocation())) {
        e.setCancelled(true);
        return;
      }
    }
    if (litCreeper.contains(creeper.getUniqueId())) {
      if (DEBUG) {
        plugin.getLogger().info("String_Node_Str");
      }
      e.setCancelled(true);
      return;
    }
  }
  if (e.getDamager() instanceof Player) {
    Player p=(Player)e.getDamager();
    if (p.isOp() || VaultHelper.checkPerm(p,Settings.PERMPREFIX + "String_Node_Str")) {
      return;
    }
  }
  boolean flamingArrow=false;
  Player attacker=null;
  if (e.getDamager() instanceof Player) {
    attacker=(Player)e.getDamager();
  }
 else   if (e.getDamager() instanceof Projectile) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    Projectile p=(Projectile)e.getDamager();
    if (DEBUG)     plugin.getLogger().info("String_Node_Str" + p.getShooter().toString());
    if (p.getShooter() instanceof Player) {
      attacker=(Player)p.getShooter();
      if (p.getFireTicks() > 0) {
        flamingArrow=true;
      }
      if (DEBUG)       plugin.getLogger().info("String_Node_Str" + p.getFireTicks() + "String_Node_Str"+ p.getMaxFireTicks());
    }
  }
  if (attacker == null) {
    return;
  }
  if (e.getEntity() instanceof Player && attacker.equals((Player)e.getEntity())) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  if (e.getEntity() instanceof ItemFrame || e.getEntityType().toString().endsWith("String_Node_Str")) {
    if (Settings.allowSpawnBreakBlocks && island != null && island.isSpawn()) {
      return;
    }
    if (island != null && (island.getIgsFlag(Flags.allowBreakBlocks) || island.getMembers().contains(attacker.getUniqueId()))) {
      return;
    }
    attacker.sendMessage(ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    e.setCancelled(true);
    return;
  }
  if (e.getEntity() instanceof Monster || e.getEntity() instanceof Slime || e.getEntity() instanceof Squid) {
    if (island != null && island.getMembers().contains(attacker.getUniqueId())) {
      return;
    }
    if (Settings.allowHurtMonsters) {
      if (!Settings.allowCreeperGriefing && e.getEntity() instanceof Creeper) {
        ItemStack holding=attacker.getItemInHand();
        if (holding != null && holding.getType().equals(Material.FLINT_AND_STEEL)) {
          litCreeper.add(e.getEntity().getUniqueId());
          if (DEBUG) {
            plugin.getLogger().info("String_Node_Str");
          }
        }
      }
      return;
    }
    attacker.sendMessage(ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    e.setCancelled(true);
    return;
  }
  if (e.getEntity() instanceof Animals || e.getEntity() instanceof IronGolem || e.getEntity() instanceof Snowman|| e.getEntity() instanceof Villager) {
    if (island != null && island.isSpawn() && Settings.allowSpawnAnimalKilling) {
      return;
    }
    if (island != null && (island.getIgsFlag(Flags.allowHurtMobs) || island.getMembers().contains(attacker.getUniqueId()))) {
      return;
    }
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    attacker.sendMessage(ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    e.setCancelled(true);
    return;
  }
  boolean pvp=false;
  if (island != null && island.isSpawn() && Settings.allowSpawnPVP) {
    pvp=true;
  }
 else   if ((inNether && island != null && island.getIgsFlag(Flags.allowNetherPvP) || (!inNether && island != null && island.getIgsFlag(Flags.allowPvP)))) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    pvp=true;
  }
  if (e.getEntity() instanceof Player) {
    if (pvp) {
      return;
    }
 else {
      attacker.sendMessage(ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).targetInNoPVPArea);
      if (flamingArrow)       e.getEntity().setFireTicks(0);
      e.setCancelled(true);
      return;
    }
  }
}

Fixed version (ground truth):
/** 
 * This method protects players from PVP if it is not allowed and from arrows fired by other players
 * @param e
 */
@EventHandler(priority=EventPriority.LOW,ignoreCancelled=true) public void onEntityDamage(final EntityDamageByEntityEvent e){
  if (DEBUG) {
    plugin.getLogger().info(e.getEventName());
    plugin.getLogger().info("String_Node_Str" + e.getDamager().toString());
    plugin.getLogger().info("String_Node_Str" + e.getEntityType());
    plugin.getLogger().info("String_Node_Str" + e.getEntity());
  }
  if (!inWorld(e.getEntity())) {
    return;
  }
  Island island=plugin.getGrid().getProtectedIslandAt(e.getEntity().getLocation());
  boolean inNether=false;
  if (e.getEntity().getWorld().equals(ASkyBlock.getNetherWorld())) {
    inNether=true;
  }
  if (!Settings.allowTNTDamage && e.getDamager().getType().equals(EntityType.PRIMED_TNT)) {
    e.setCancelled(true);
    return;
  }
  if (island != null && island.isSpawn() && e.getDamager().getType().equals(EntityType.CREEPER) && Settings.allowSpawnCreeperPain) {
    return;
  }
  if (!Settings.allowCreeperDamage && e.getDamager().getType().equals(EntityType.CREEPER) && !(e.getEntity() instanceof Player)) {
    e.setCancelled(true);
    return;
  }
  if (!Settings.allowCreeperGriefing && e.getDamager().getType().equals(EntityType.CREEPER)) {
    Creeper creeper=(Creeper)e.getDamager();
    if (creeper.getTarget() instanceof Player) {
      Player target=(Player)creeper.getTarget();
      if (!plugin.getGrid().locationIsOnIsland(target,e.getEntity().getLocation())) {
        e.setCancelled(true);
        return;
      }
    }
    if (litCreeper.contains(creeper.getUniqueId())) {
      if (DEBUG) {
        plugin.getLogger().info("String_Node_Str");
      }
      e.setCancelled(true);
      return;
    }
  }
  if (e.getDamager() instanceof Player) {
    Player p=(Player)e.getDamager();
    if (p.isOp() || VaultHelper.checkPerm(p,Settings.PERMPREFIX + "String_Node_Str")) {
      return;
    }
  }
  boolean flamingArrow=false;
  Player attacker=null;
  if (e.getDamager() instanceof Player) {
    attacker=(Player)e.getDamager();
  }
 else   if (e.getDamager() instanceof Projectile) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    Projectile p=(Projectile)e.getDamager();
    if (DEBUG)     plugin.getLogger().info("String_Node_Str" + p.getShooter().toString());
    if (p.getShooter() instanceof Player) {
      attacker=(Player)p.getShooter();
      if (p.getFireTicks() > 0) {
        flamingArrow=true;
      }
      if (DEBUG)       plugin.getLogger().info("String_Node_Str" + p.getFireTicks() + "String_Node_Str"+ p.getMaxFireTicks());
    }
  }
  if (attacker == null) {
    return;
  }
  if (e.getEntity() instanceof Player && attacker.equals((Player)e.getEntity())) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  if (e.getEntity() instanceof ItemFrame || e.getEntityType().toString().endsWith("String_Node_Str")) {
    if (Settings.allowSpawnBreakBlocks && island != null && island.isSpawn()) {
      return;
    }
    if (island != null && (island.getIgsFlag(Flags.allowBreakBlocks) || island.getMembers().contains(attacker.getUniqueId()))) {
      return;
    }
    attacker.sendMessage(ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    e.setCancelled(true);
    return;
  }
  if (e.getEntity() instanceof Monster || e.getEntity() instanceof Slime || e.getEntity() instanceof Squid) {
    if (island != null && island.getMembers().contains(attacker.getUniqueId())) {
      return;
    }
    if (Settings.allowHurtMonsters) {
      if (!Settings.allowCreeperGriefing && e.getEntity() instanceof Creeper) {
        ItemStack holding=attacker.getItemInHand();
        if (holding != null && holding.getType().equals(Material.FLINT_AND_STEEL)) {
          litCreeper.add(e.getEntity().getUniqueId());
          if (DEBUG) {
            plugin.getLogger().info("String_Node_Str");
          }
        }
      }
      return;
    }
    attacker.sendMessage(ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    e.setCancelled(true);
    return;
  }
  if (e.getEntity() instanceof Animals || e.getEntity() instanceof IronGolem || e.getEntity() instanceof Snowman|| e.getEntity() instanceof Villager) {
    if (island != null && island.isSpawn() && Settings.allowSpawnAnimalKilling) {
      return;
    }
    if (island != null && (island.getIgsFlag(Flags.allowHurtMobs) || island.getMembers().contains(attacker.getUniqueId()))) {
      return;
    }
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    attacker.sendMessage(ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    e.setCancelled(true);
    return;
  }
  boolean pvp=false;
  if (island != null && island.isSpawn() && Settings.allowSpawnPVP) {
    pvp=true;
  }
 else   if ((inNether && island != null && island.getIgsFlag(Flags.allowNetherPvP) || (!inNether && island != null && island.getIgsFlag(Flags.allowPvP)))) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    pvp=true;
  }
  if (e.getEntity() instanceof Player) {
    if (pvp) {
      return;
    }
 else {
      attacker.sendMessage(ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).targetInNoPVPArea);
      if (flamingArrow)       e.getEntity().setFireTicks(0);
      e.setCancelled(true);
      return;
    }
  }
}