mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
*
This commit is contained in:
parent
c9cee8a4a8
commit
af99c6a706
@ -245,17 +245,18 @@ public abstract class HybridUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!chunks.isEmpty()) {
|
if (!chunks.isEmpty()) {
|
||||||
while (System.currentTimeMillis() < 10 && !chunks.isEmpty()) {
|
|
||||||
Iterator<ChunkLoc> iterator = chunks.iterator();
|
|
||||||
final ChunkLoc chunk = iterator.next();
|
|
||||||
iterator.remove();
|
|
||||||
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Object value) {
|
public void run(Object value) {
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
while (System.currentTimeMillis() - start < 20 && !chunks.isEmpty()) {
|
||||||
|
Iterator<ChunkLoc> iterator = chunks.iterator();
|
||||||
|
final ChunkLoc chunk = iterator.next();
|
||||||
|
iterator.remove();
|
||||||
regenerateRoad(area, chunk, extend);
|
regenerateRoad(area, chunk, extend);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user