teleportTo problem

Discussion in 'Plugin Development' started by jumika, Mar 17, 2011.

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


    Hi guys!
    I have a little problem with using telportTo function.
    It works fine when the target location's chunk is loaded, but if it's not, than the player only falls to the bottom of the map, and start taking damage.
    Do you guys have a practice for loading the chunk before teleport?
    I've taken a look on some source code, but everywhere i've just seen the teleportTo alone.
    I've tried to use the loadChunk method before teleportTo, but it isn't brought me any succes.
    Any advices?
  2. Offline


    Are you using teleportTo like this:
     Player player = victim;
            player.teleportTo(new Location(world, x, y, z));
    Maybe you aren't giving the Location a world ? I think that the chunk should load automatically

    Take a look at scrapbukkit
Thread Status:
Not open for further replies.

Share This Page