Teleport and "empty" chunks

Discussion in 'Plugin Development' started by fromgate, Nov 25, 2011.

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

    fromgate

    Hello!

    I'm trying to teleport player to location. After teleporting every chunks loading, except chunk where player located. I'm trying to load chunk before teleporting player, but without any positive effect.

    if (!loc.getBlock().getChunk().isLoaded()) loc.getBlock().getChunk().load();
    player.teleport(loc);

    Please, help me. How I can force chunk load before player teleporting?
     
  2. Offline

    Jayjay110

    maybe freeze the player until the chunk is loaded? So make a loop to constantly check if the chunk is loaded, else cancel the move event of the player?
     
Thread Status:
Not open for further replies.

Share This Page