How can I teleport a player in a minecart

Discussion in 'Plugin Development' started by EvilPeanut, Feb 2, 2013.

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

    EvilPeanut

    Using VehicleMoveEvent How can I teleport a player who is in a minecart, but keep him in the minecart and keep momentum when he is teleported?
     
  2. Offline

    XSilver_FalconX

    I think you'll have to tp the player and then spawn in the minecart at his new teleported location and set him as the driver.
     
  3. I doubt u can keep momentun, you can try to teleport it onto a slope with powered rails though.
     
  4. Offline

    s0undx

    Or you can get the old vehicle's velocity and set it on the new one.
     
  5. Offline

    EvilPeanut

    how...
     
  6. Offline

    s0undx

    maybe getVelocity and setVelocity ....
    how surprising...
     
  7. Offline

    EvilPeanut

    How can i create a vehicle at X location using code?
     
  8. Offline

    chasechocolate

    Minecarts are entities, so I think the same way as you would spawn any other entity.
     
  9. Offline

    s0undx

    world.spawnEntity
     
Thread Status:
Not open for further replies.

Share This Page