Potential fixes

Fixes #712
Fixes #711
Fixes #707
Fixes #705
Fixes #702
Fixes #698
Fixes #697
Fixes #694
Fixes #717
This commit is contained in:
Jesse Boyd
2015-11-15 13:30:52 +11:00
parent c32edfe0ee
commit 93a7b2cace
23 changed files with 290 additions and 278 deletions

View File

@ -107,12 +107,11 @@ public abstract class ChunkManager {
public abstract void unloadChunk(final String world, final ChunkLoc loc, final boolean save, final boolean safe);
public Set<ChunkLoc> getChunkChunks(final String world) {
final String directory = PS.get().IMP.getWorldContainer() + File.separator + world + File.separator + "region";
final File folder = new File(directory);
final File folder = new File(PS.get().IMP.getWorldContainer(), world + File.separator + "region");
final File[] regionFiles = folder.listFiles();
final HashSet<ChunkLoc> chunks = new HashSet<>();
if (regionFiles == null) {
throw new RuntimeException("Could not find worlds folder.");
throw new RuntimeException("Could not find worlds folder: " + folder + " ? (no read access?)");
}
for (final File file : regionFiles) {
final String name = file.getName();

View File

@ -563,6 +563,9 @@ public class MainUtil {
return true;
}
public static boolean isPlotAreaAbs(final Location location) {
if (!Settings.ENABLE_CLUSTERS) {
return true;
}
final PlotWorld plotworld = PS.get().getPlotWorld(location.getWorld());
if (plotworld == null) {
@ -586,6 +589,9 @@ public class MainUtil {
return manager.getPlotId(plotworld, location.getX(), location.getY(), location.getZ()) == null;
}
public static boolean isPlotArea(final Plot plot) {
if (!Settings.ENABLE_CLUSTERS) {
return true;
}
final PlotWorld plotworld = PS.get().getPlotWorld(plot.world);
if (plotworld.TYPE == 2) {