Teleporting multiple players to multiple destinations

Discussion in 'Plugin Development' started by THEK, Dec 7, 2012.

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

    THEK

    I've spend the last 4 days trying to work this out.

    Imaging I wanted to teleport X players to Y destinations. In between each destination there is either a delay of Z seconds or until Player P types a command.

    How would I go about that? I thought about running in an asynchronous task but I don't think it is safe to teleport players in a separate thread because your not allowed to access the Bukkit API.

    I would appreciate any help on this. Or if it nearly impossible just say so :)
     
  2. Offline

    tommycake50

    a Synchronous task maybe?
    idk a lot could go wrong i havent really worked with them much but you could try a SynchronousDelayedTask.
     
  3. Offline

    RealDope

    Yeah just start a delayed task? I don't see the problem, just set the delay to as long as you want and then inside it call player.teleport(location);
     
Thread Status:
Not open for further replies.

Share This Page