mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Fix
This commit is contained in:
parent
04de362bc9
commit
3b61b87501
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package com.volmit.iris.core.pregenerator.methods;
|
package com.volmit.iris.core.pregenerator.methods;
|
||||||
|
|
||||||
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.IrisSettings;
|
import com.volmit.iris.core.IrisSettings;
|
||||||
import com.volmit.iris.core.pregenerator.PregenListener;
|
import com.volmit.iris.core.pregenerator.PregenListener;
|
||||||
import com.volmit.iris.core.pregenerator.PregeneratorMethod;
|
import com.volmit.iris.core.pregenerator.PregeneratorMethod;
|
||||||
@ -48,6 +49,12 @@ public class AsyncPregenMethod implements PregeneratorMethod {
|
|||||||
private void unloadAndSaveAllChunks() {
|
private void unloadAndSaveAllChunks() {
|
||||||
try {
|
try {
|
||||||
J.sfut(() -> {
|
J.sfut(() -> {
|
||||||
|
if(world == null)
|
||||||
|
{
|
||||||
|
Iris.warn("World was null somehow...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (Chunk i : world.getLoadedChunks()) {
|
for (Chunk i : world.getLoadedChunks()) {
|
||||||
i.unload(true);
|
i.unload(true);
|
||||||
}
|
}
|
||||||
|
@ -256,9 +256,17 @@ public class J {
|
|||||||
* @param delay the delay to wait in ticks before running
|
* @param delay the delay to wait in ticks before running
|
||||||
*/
|
*/
|
||||||
public static void s(Runnable r, int delay) {
|
public static void s(Runnable r, int delay) {
|
||||||
|
try
|
||||||
|
{
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, r, delay);
|
Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, r, delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
catch(Throwable e)
|
||||||
|
{
|
||||||
|
Iris.reportError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancel a sync repeating task
|
* Cancel a sync repeating task
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user