Don't allow importing using base directory

This commit is contained in:
Jesse Boyd 2019-04-17 14:36:31 +10:00
parent 7e63ffe745
commit 000e3de35d
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -36,6 +36,10 @@ import java.util.UUID;
SinglePlotArea area = ((SinglePlotAreaManager) pam).getArea();
PlotId id = new PlotId(0, 0);
File container = PlotSquared.imp().getWorldContainer();
if (container.equals(new File("."))) {
player.sendMessage("World container must be configured to be a separate directory to your base files!");
return;
}
for (File folder : container.listFiles()) {
String name = folder.getName();
if (!WorldUtil.IMP.isWorld(name) && PlotId.fromString(name) == null) {