Is there a event for when a player scrolls along their hotbar?

Discussion in 'Plugin Development' started by JD_Guy17, Mar 23, 2014.

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

    JD_Guy17

    I have looked on the internet and Bukkit api docs, but i can't seem to find a event for when a player scrolls or presses a number to change the item slot on their hotbar. Is there a event for this?

    Thanks in advance :)!
     
  2. Offline

    Onlineids

    try these two cases

    case HOTBAR_SWAP:
    case HOTBAR_MOVE_AND_READD:
     
  3. Offline

    JD_Guy17

  4. Offline

    Onlineids

    Maybe InventoryInteractEvent not sure
     
  5. Offline

    adam753

  6. Offline

    JD_Guy17

    adam753 I think thats right but I can work out how to get the last previous slot and check what it is. Could you help?
     
  7. Offline

    adam753

    Probably like
    Code:
    ItemStack i = event.getPlayer().getInventory().getItem( event.getPreviousSlot() );
     
    JD_Guy17 likes this.
Thread Status:
Not open for further replies.

Share This Page