PlayerInteractEvent called twice when main hand empty and off-hand not

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

      Minecraft 1.9
      Spigot version git-Spigot-1a196e1-7 6c0425 (MC: 1.9) (Implementing API version 1.9-R0.1-SNAPSHOT)
      Windows 7 64Bit
      Java 1.8.0_51

      When right click a block with a block in the off-hand (place the block) and the main hand is empty, the PlayerInteractEvent called twice (one time with an item and another time without, probably call for each hand)

      Code:

      @EventHandler
      public void onPlayerIneractEvent(PlayerInteractEvent e) {
      	System.out.println("onPlayerIneractEvent() called");
      	System.out.println("onPlayerIneractEvent() item: " + (e.hasItem() ? e.getItem().getType() : "null"));
      	}
      

      Result (Sand in the off-hand, nothing in the main hand):
      [22:55:50 INFO]: onPlayerIneractEvent() called
      [22:55:50 INFO]: onPlayerIneractEvent() item: null
      [22:55:50 INFO]: onPlayerIneractEvent() called
      [22:55:50 INFO]: onPlayerIneractEvent() item: SAND

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

              Created:
              Updated:
              Resolved: