mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 12:06:15 +01:00
Reduce memory usage of RegenAllRoads
This commit is contained in:
parent
ceb4ffa45e
commit
2341b2b972
@ -163,6 +163,7 @@ public abstract class HybridUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ChunkManager.manager.unloadChunk(world, chunk);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,8 @@ public abstract class ChunkManager {
|
|||||||
|
|
||||||
public abstract boolean loadChunk(String world, ChunkLoc loc);
|
public abstract boolean loadChunk(String world, ChunkLoc loc);
|
||||||
|
|
||||||
|
public abstract boolean unloadChunk(String world, ChunkLoc loc);
|
||||||
|
|
||||||
public abstract List<ChunkLoc> getChunkChunks(String world);
|
public abstract List<ChunkLoc> getChunkChunks(String world);
|
||||||
|
|
||||||
public abstract void deleteRegionFile(final String world, final ChunkLoc loc);
|
public abstract void deleteRegionFile(final String world, final ChunkLoc loc);
|
||||||
|
@ -778,6 +778,11 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
return BukkitUtil.getWorld(world).getChunkAt(loc.x, loc.z).load(false);
|
return BukkitUtil.getWorld(world).getChunkAt(loc.x, loc.z).load(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean unloadChunk(final String world, final ChunkLoc loc) {
|
||||||
|
return BukkitUtil.getWorld(world).getChunkAt(loc.x, loc.z).unload(true, true);
|
||||||
|
}
|
||||||
|
|
||||||
public static void swapChunk(World world, Chunk pos1, Chunk pos2, RegionWrapper r1, RegionWrapper r2) {
|
public static void swapChunk(World world, Chunk pos1, Chunk pos2, RegionWrapper r1, RegionWrapper r2) {
|
||||||
initMaps();
|
initMaps();
|
||||||
int relX = (r2.minX - r1.minX);
|
int relX = (r2.minX - r1.minX);
|
||||||
|
Loading…
Reference in New Issue
Block a user