Fix pregen resume issue

This commit is contained in:
Daniel Mills 2020-10-21 11:04:19 -04:00
parent 68e1830d8e
commit 2641220fb0

View File

@ -372,6 +372,8 @@ public class PregenJob implements Listener
@EventHandler
public void on(ChunkUnloadEvent e)
{
try
{
if(e.getWorld().equals(world) && isChunkWithin(e.getChunk().getX(), e.getChunk().getZ()) && consumer != null)
{
@ -379,6 +381,12 @@ public class PregenJob implements Listener
}
}
catch(Throwable ex)
{
}
}
public void saveAll()
{
for(Chunk i : world.getLoadedChunks())