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

PlayerPickupArrowEvent#getItem does not respond to changes in the item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • irrelevant in this case

      We should be able to change the item that gets picked up in PlayerPickupArrowEvent like so:

      @EventHandler
      public void onPlayerPickupArrow(PlayerPickupArrowEvent event) {
      	Item item = event.getItem();
              item.setItemStack(new ItemStack(Material.STICK, 1));
      }
      

      This code has no effect on the item that gets picked up.

            Unassigned Unassigned
            JacobCrofts Jacob Crofts
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: