Solved Is there any way how to get easily all passengers?

Discussion in 'Plugin Development' started by IconByte, Jun 14, 2015.

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

    IconByte

    I am having problem with counting passengers who are riding player. Is there any way how to get all passengers ontop a player? (For example: Player->Pig->Pig->Pig = 3 passengers)?
     
  2. Offline

    timtower Moderator Moderator

    @IconByte Make a method getPassengers(Entity, list<Entity> passengers)
    Let the method add the passenger to the list, and execute the method on that passenger with the same list parameter
     
  3. Offline

    IconByte

    Awesome, thank you! :)
    Solved.
     
Thread Status:
Not open for further replies.

Share This Page