tp to a certain cords?

Discussion in 'Plugin Development' started by Btomhat, Aug 27, 2013.

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

    Btomhat

    so i'm trying to make a plugin to make a player tp 100 (or so) blocks in the air and then explode. i'm new to coding plugins and i don't know how to make someone tp to certain cords or explode. how could i do this?
     
  2. I would just change his velocity so he flies up, and then create an explosion at his location.
     
  3. Offline

    chasechocolate

    Explosion would be: player.getWorld().createExplosion(player.getLocation(), size). Size is a float, the size of TNT is 4 I think.
     
  4. Offline

    Btomhat

    ok how could i do that?

    alright thnx i'll try it in a bit

    hey also can i get some help with figuring out how to execute the command when you right click with a stick.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  5. Btomhat something like this:

    player.setVelocity(new vector(0, 1, 0));
    player.getWorld().createExplosion(...
     
  6. Offline

    Btomhat

    thanx man

    alright now i need to know how to put a delay in between the velocity and the explosion without temporarily freezing the server.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  7. Btomhat No problem, happy coding!
     
Thread Status:
Not open for further replies.

Share This Page