// iterate through the chunks
if (regening) {
for (int x = chunkX - radius; x <= chunkX + radius; x++) {
for (int z = chunkZ - radius; z <= chunkZ + radius; z++) {
player.sendMessage("Regenerating chunk[" + x + ", " + z + "]");
world.regenerateChunk(x, z);
}
}
}
// cleaning up chunks of stray items