• Type: Bug
    • Resolution: Done
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • This server is running CraftBukkit version 4263-Spigot-491f367-bed1e3f (MC: 1.21) (Implementing API version 1.21-R0.1-SNAPSHOT)
    • Yes

      WindCharge is an Entity and a Projectile (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/WindCharge.html) so I would assume that when it is aimed at buttons, or pressure plates, etc, and triggers them, that it would result in the firing of the EntityInteractEvent, however it does not.

      Here's the test code:

      public class TestPlugin extends JavaPlugin implements Listener {
      
          @Override
          public void onEnable() {
              getLogger().info("Test plugin loaded");
              Bukkit.getPluginManager().registerEvents(this, this);
          }
      
          @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = false)
          public void onProjectileHit(EntityInteractEvent e) {
              Bukkit.getLogger().info(e.getEventName());
              if (e.getEntity() instanceof Projectile p) {
                  Bukkit.getLogger().info("The projectile was a " + p.getShooter());
              }
          }
      } 

      Set up a button on a tree for example, step away and fire a wind charge at the button, it will activate, but no event will fire. Fire an arrow with a bow at the same button, and you'll see the logging in the console.

      I assume that this event is the one that fires, but if there's another then I apologize.

            Assignee:
            Unassigned
            Reporter:
            tastybento
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: