setRepairAmount of the PlayerItemMendEvent is broken ?

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • 3216-Spigot-ff89b97-61e4ca7 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
    • Yes

      I tried to modify the repair amount of mending using the setRepairAmount method.
      But as soon i use this method e.g. setRepairAmount(1) the PlayerItemMendEvent will be called more then 500 times (which results that the item is instantly repaired).

      Output: https://paste.md-5.net/ajirexulic.md

      In Class A:

      @EventHandler
          public void mending(PlayerItemMendEvent event) {
              System.out.println("MENDING EVENT CALLED");
          }

      In Class B:

      @EventHandler
          public void mending(PlayerItemMendEvent event) {
              event.setRepairAmount(1);
          }
      

      (Two event listeners to be sure if the event will be called multiple times or if the debug message will be outputed multiple times)

            Assignee:
            Unassigned
            Reporter:
            False
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: