Right click air not working?

Discussion in 'Plugin Development' started by Minnymin3, Apr 20, 2014.

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

    Minnymin3

    So when I'm trying to right click air the event doesn't fire...

    Code:
    @EventHandler
    public void test(PlayerInteractEvent event) {
    System.out.println(event.getAction());
    }
    It only gets triggered when I click blocks or left click air.

    Edit: turns out that the right click event isn't called when the player doesn't have anything in their hand
     
  2. Offline

    Schaakmatth

    You have to add a action where you right click air
     
  3. Offline

    Seadragon91

    I tested it and the events gets only triggered if I have a item in the hand, when I make a right click into air. Not sure if that is a bug or not.

    Edit: Ok I read that the event isn't called if you have no item in the hand and make a right click into air. It's not serious, I think. Add a item check and problem is gone.
     
Thread Status:
Not open for further replies.

Share This Page