Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7968

ProjectileHitEvent not trigerred when Projectile hits entity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • This server is running CraftBukkit version 4394-Spigot-60c9969-2b9a094
    • Yes

      Hello the ProjectileHitEvent is not triggered when the projectile hit an entity.
      It works fine for blocks.

      Small testing plugin attached with the following method.

      @EventHandler
          public void onProjectileHitEvent(ProjectileHitEvent e) {
              Entity projectile = e.getEntity();
              Entity target;
      
              Bukkit.getServer().getConsoleSender().sendMessage("ProjectileHitEvent");
      
              if ((target = e.getHitEntity()) != null && !(target instanceof Player)) {
                  Bukkit.getServer().getConsoleSender().sendMessage("ProjectileHitEvent: HitEntity");
              }
      
          }
      

            Unassigned Unassigned
            Ssomar Ssomar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: