mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-01 13:14:43 +02:00
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:
@ -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();
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user