mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 16:46:45 +01:00
Merge pull request #179 from romanalexander/master
Need to use world folder container than getting the relative path.
This commit is contained in:
commit
2a5a064bb9
@ -62,10 +62,13 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<ChunkLoc> getChunkChunks(final String world) {
|
public ArrayList<ChunkLoc> getChunkChunks(final String world) {
|
||||||
final String directory = new File(".").getAbsolutePath() + File.separator + world + File.separator + "region";
|
final String directory = Bukkit.getWorldContainer() + File.separator + world + File.separator + "region";
|
||||||
final File folder = new File(directory);
|
final File folder = new File(directory);
|
||||||
final File[] regionFiles = folder.listFiles();
|
final File[] regionFiles = folder.listFiles();
|
||||||
final ArrayList<ChunkLoc> chunks = new ArrayList<>();
|
final ArrayList<ChunkLoc> chunks = new ArrayList<>();
|
||||||
|
if (regionFiles == null) {
|
||||||
|
throw new RuntimeException("Could not find worlds folder.");
|
||||||
|
}
|
||||||
for (final File file : regionFiles) {
|
for (final File file : regionFiles) {
|
||||||
final String name = file.getName();
|
final String name = file.getName();
|
||||||
if (name.endsWith("mca")) {
|
if (name.endsWith("mca")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user