How to get item player is moving.

Discussion in 'Plugin Development' started by Kargond, Jul 14, 2015.

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

    Kargond

    Hey! When you click with your item in the inventory you can move it. How to get item player is moving and also how to cancel moving. Well, I dont want just to disable player moving items at all. But I want to stop player to move item on teleport for example. So, if you are moving any item and teleport, item, which you move will reset(just as you put it back into inventory, but don't put it into inventory).
     
  2. Offline

    SuperSniper

    Code:
    @EventHandler
    public void onClick(InventoryClickEvent e) {
    if(e.getInventory().getType() == InventoryType.PLAYER)) {
    if(e.getItem().getType() == MATERIAL)) {
    // do stuff
    
     
Thread Status:
Not open for further replies.

Share This Page