Solved InventoryClickEvent#setCancelled(true) working bad

Discussion in 'Plugin Development' started by w0lves, Oct 29, 2020.

  1. Offline


    Plugin version: 1.16.3

    Problem: when i click an item after setting event.setCancelled(true) i can "drag it" until i click again somewhere

    Okay, basically im trying to make someone not able to click items on an inventory.

        public void onClick(InventoryClickEvent event) {
    Easy, but now when i click an item i can "drag it" until i click again somewhere

    I want just the item not be able to get clicked, it's simple.. :(

    What you can do to recreate the problem:

    The FULL Error log: No console errors

    What you have tried: I tried updating the inventory, idk
  2. Offline


    you also need to cancel the InventoryDragEvent, its a seperate event, hope that helps
    KarimAKL likes this.
  3. Offline


    Finally i found the mistake... just i was testing it on creative lol such a fail xd

Share This Page