mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 14:21:33 +00:00
f
This commit is contained in:
@@ -207,23 +207,11 @@ public class PregenJob implements Listener
|
|||||||
{
|
{
|
||||||
if(clf.flip())
|
if(clf.flip())
|
||||||
{
|
{
|
||||||
int g = 0;
|
|
||||||
|
|
||||||
for(Chunk i : world.getLoadedChunks())
|
for(Chunk i : world.getLoadedChunks())
|
||||||
{
|
|
||||||
g++;
|
|
||||||
|
|
||||||
if(g > 1500)
|
|
||||||
{
|
|
||||||
i.unload(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
world.unloadChunkRequest(i.getX(), i.getZ());
|
world.unloadChunkRequest(i.getX(), i.getZ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(clx.flip())
|
if(clx.flip())
|
||||||
{
|
{
|
||||||
@@ -242,22 +230,10 @@ public class PregenJob implements Listener
|
|||||||
|
|
||||||
public void saveAll()
|
public void saveAll()
|
||||||
{
|
{
|
||||||
int g = 0;
|
|
||||||
|
|
||||||
for(Chunk i : world.getLoadedChunks())
|
for(Chunk i : world.getLoadedChunks())
|
||||||
{
|
|
||||||
g++;
|
|
||||||
|
|
||||||
if(g > 1500)
|
|
||||||
{
|
|
||||||
i.unload(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
world.unloadChunkRequest(i.getX(), i.getZ());
|
world.unloadChunkRequest(i.getX(), i.getZ());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
world.save();
|
world.save();
|
||||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "save-all");
|
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "save-all");
|
||||||
|
|||||||
Reference in New Issue
Block a user