PlayerInteractEvent execution does not align with Javadocs description

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      Latest spigot build (built with buildtools at 15.11.2018 minutes before creating this ticket) version description Jenkins Build 1953, buildtools version 75

      Java 8

    • 1.13.2
    • Yes

      As javadocs of the PlayerInteractEvent describe "This event will fire as canceled if the vanilla behavior is to do nothing (e.g interacting with air)", the description does not hold true.

      When clicking a side of a block with a flower etc., the event will be fired as uncancelled, thus leading to unwanted behavior.

      Video demonstrating the issue https://www.youtube.com/watch?v=565xW9wtpRA

      @EventHandler
      public void onPlayerInteract(PlayerInteractEvent event) {
          Bukkit.broadcastMessage("Cancelled: " + event.isCancelled());  
      }
      

      Minimal reproduction plugin attached.

            Assignee:
            Unassigned
            Reporter:
            Nuubles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: