Right Clicking A Player

Discussion in 'Plugin Development' started by Herbert_The_Pervert, Jun 23, 2014.

Thread Status:
Not open for further replies.
  1. Hello Everyone !!
    I am trying to make it that when you right click a player something will happen

    this is my code right now
    Code:java
    1. @EventHandler
    2. public void onPlayerInteract(PlayerInteractEvent e) {
    3. Player p = e.getPlayer();
    4. if(!(e.getAction() == Action.RIGHT_CLICK_AIR)) return;
    5.  
    6. }
     
  2. Offline

    Gamecube762

    Try PlayerInteractEntityEvent and check if the entity is another player then do what you need.
     
Thread Status:
Not open for further replies.

Share This Page