From 000e3de35d483572f87b784d73fb9ff054620d85 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 17 Apr 2019 14:36:31 +1000 Subject: [PATCH] Don't allow importing using base directory --- .../plotsquared/plot/commands/DebugImportWorlds.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java index ddffaf744..85fb9a752 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java @@ -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) {