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

Add event to get/modify items that get collected to cursor on double click

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None

      When double clicking an item in the inventory with an empty cursor it will collect all items in the inventory up to a stack to the cursor. Currently this only calls the InventoryClickEvent with the COLLECT_TO_CURSOR InventoryAction but there is no way to get (and modify) all stacks that where changed due to this collecting.

      A separate InventoryCollectToCursorEvent or similarly named event should be added so that these items and modified slots can be queried and changed/removed. This helps with the creation of inventory GUIs.

      Alternatively a more general event could be constructed that allows to catch all actions that modify multiple items/slots (like collecting, the moving of all items to another inventory and dragging) and to properly modify which item gets affected by that action. Currently plugins that want to filter that must manually re-implement these functions.

            Unassigned Unassigned
            Phoenix616 Phoenix616
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: