Getting a group of chunks

Discussion in 'Spigot Plugin Development' started by SpiroMarshes, Jun 29, 2016.

  1. Hey guys,

    I'm trying to figure out how I would get a chunk that a player is in, and then also get the adjacent chunks to add them to an array.

  2. That post and maybe a post above it might help for that aswell. (Depending on how you saved it)
  3. Just use world.getChunk(x,z)?
  4. Choco


    Get the chunk you need relative to the player (Player#getChunk()), get the coordinates of said Chunk object (x / y), use World#getChunk(x, y) for each relative chunk around the player (Add / Remove 1 to / from the respective x / y coordinates)