Targeting Entitys with interact event

Discussion in 'Plugin Development' started by frogawesome, Jul 31, 2013.

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

    frogawesome

    i'm making a plugin where people can right click on an entity to put them on their heads. only problem i have no idea how to target the entitys infront of them.
     
  2. Offline

    RROD

    There's PlayerInteractEntityEvent you could use for getting the Entity from a right-click.
    In the event method, get the player and then get the entity. Then player.setPassenger(entity) will attach them to the player's head.
     
Thread Status:
Not open for further replies.

Share This Page