Differences between world.loadChunk() and world.refreshChunk()

Discussion in 'Plugin Development' started by TheE, Nov 16, 2012.

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

    TheE

    May anybody explain me, what are the differences between world.loadChunk() and world.refreshChunk()? I know that loadChunk() loads the chunk and refreshChunk() sends the Chunk to all clients, but I do not know how I am supposed to use both methods, when preloading a chunk before teleporting a player.

    Is it enough to load the chunk, is it enough to refresh it or do I need to do both? And how does this impact the server's performance?

    Thanks in advance.
     
  2. Offline

    Panjab

    Dont know if it works, but try this:

    world.loadChunk(<Not-loaded-chunk>);
    world.refreshChunk(<loaded-chunk-to-refresh);

    I'm not an expert on chunks, but I think it Works. ;)
     
Thread Status:
Not open for further replies.

Share This Page