Getting the Item in InventoryDragEvent

Discussion in 'Plugin Development' started by pigeontroll, Feb 26, 2014.

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

    pigeontroll

    I just need some help on getting the item in InventoryDragEvent. I am trying to make it so people cannot move their items, like on hub servers.
     
  2. Offline

    amhokies

  3. Offline

    pigeontroll

    Oh yes. How would I check the item for that?
     
  4. Offline

    amhokies

  5. Offline

    pigeontroll

  6. Offline

    diage

    That's because it's rendered on client side prior to the server saying no. Minecraft has a bulk of the 'render' done by the client and that's why cancelling events for generally seems 'laggy'.

    Unless you get super fancy, there isn't much you can do about that unfortunately.
     
  7. Offline

    pigeontroll

    But then on the larger servers if you quickly login and then move the item it still goes back.
     
  8. Offline

    diage

    Well, without knowing EXACTLY what is happening, i will defer to my last sentence :)
     
  9. Offline

    pigeontroll

    I am still stumped on this... does anyone know the solution?
     
  10. Offline

    Maurdekye

    pigeontroll If you want to get fancy, and prevent them from even being able to move the item clientside at all (because they're not actually moving it serverside, it just looks that way), then you might not be able to get help from here, as most of the visitors on this forum aren't nearly experienced enough to help you. The absolute best way is to just cancel the event.
     
  11. Offline

    pigeontroll

    That's what I did, I did e.setCancelled(true);
     
Thread Status:
Not open for further replies.

Share This Page