Solved Inventory Drag-And-Drop

Discussion in 'Plugin Development' started by Matthiaantje, Aug 29, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    Matthiaantje

    Hy everyone!
    I'm kind of new on this forum, so I hope this is the right place to post this thread!
    My question:
    I've been programming Java for a long time, but,
    Currently I'm making a menu plugin, but I've to DISABLE the drag-and-drop function so users AND ops can't just drag and drop menu items in their inventory...
    I Tried multiple algorithms, but they don't seem to work,
    Could somebody please help me with this, cause I'm stuck with it for about 4 days now :(

    Greetzz!
    Matthiaantje!
     
  2. Offline

    Zombie_Striker

    @Matthiaantje
    To stop playeres from dragging items, cancel the InventoryDragEvent. If you do not want players to modify the inventory in any way, cancel the InventoryInteractEvent.
     
    Matthiaantje likes this.
  3. Offline

    Matthiaantje

    Is it really that simple!?
    Well, that worked for me, thanks a lot!:)
     
  4. Offline

    Zombie_Striker

    @Matthiaantje
    If your problem has been solved, mark this thread as solved.
     
Thread Status:
Not open for further replies.

Share This Page