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

PlayerInteractEvent Should Not Run As Cancelled When Interacting With Air

XMLWordPrintable

    • 3274-Spigot-3892929-eb19161
    • Yes

      According to Spigot's JavaDocs, the PlayerInteractEvent runs as cancelled if a player interacts with air. Quote: "This event will fire as cancelled if the vanilla behavior is to do nothing (e.g interacting with air)."

       

      This should not be the case, because right-clicking the air with an armor piece can equip the armor piece in your hand. A cancelled event suggests this is not happening.

       

      To demonstrate the issue, I have included a plugin which broadcasts two messages - one from listening to the PlayerInteractEvent with ignoreCancelled = true, and one with ignoreCancelled = false.

            Unassigned Unassigned
            Dartanman Austin Dart
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: