1.8.8 Inventory item movement

Discussion in 'Spigot Plugin Development' started by illuminator3, Feb 10, 2020.

  1. Whenever a player moves their mouse in their inventory to a random spot and then clicks, for example, the number '9' the item in his 9th slot will be moved to that place. How would I be able to cancel that?
  2. InventoryClickEvent I believe
  3. You can get the cursor in the InventoryClickEvent
  4. InventoryClickEvent doesn't work
  5. InventoryClickEvent should apply when looking for ClickType.NUMBER_KEY
  6. @illuminator3
    Code (Text):
            if (event.getClick()== ClickType.NUMBER_KEY) {}