Random Teleportation Not in Block API

Discussion in 'Resources' started by Lactem, Aug 19, 2013.

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


    I've decided to make an API that teleports players to a random location within two locations. Before you can do anything, you have to download the classes and put them into your project.

    Download link: me.zip

    Next, you have to create a cuboid using two locations. These will be the locations that the player should be teleported between.
    1. Cuboid cuboid = new Cuboid(min, max);
    Now that you have the cuboid, you can generate a spawn and teleport your player there.
    1. player.teleport(GenerateSpawn.generateRandomSpawn(cuboid, player);
    That's it! Your player is now teleported and he/she didn't spawn in a block.​

    Attached Files:

    • me.zip
      File size:
      3.3 KB
Thread Status:
Not open for further replies.

Share This Page