mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Schematic paths are configurable (#3303)
This commit is contained in:
parent
e126547e97
commit
88775334b7
@ -29,6 +29,7 @@ import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.ConfigurationSection;
|
||||
import com.plotsquared.core.configuration.ConfigurationUtil;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.CaptionHolder;
|
||||
import com.plotsquared.core.configuration.caption.Templates;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
@ -222,7 +223,7 @@ public class Area extends SubCommand {
|
||||
hybridPlotWorld.setAllowSigns(false);
|
||||
final File parentFile = FileUtils.getFile(
|
||||
PlotSquared.platform().getDirectory(),
|
||||
"schematics" + File.separator + "GEN_ROAD_SCHEMATIC" + File.separator + hybridPlotWorld.getWorldName() + File.separator
|
||||
Settings.Paths.SCHEMATICS + File.separator + "GEN_ROAD_SCHEMATIC" + File.separator + hybridPlotWorld.getWorldName() + File.separator
|
||||
+ hybridPlotWorld.getId()
|
||||
);
|
||||
if (!parentFile.exists() && !parentFile.mkdirs()) {
|
||||
|
@ -82,10 +82,12 @@ public class HybridPlotManager extends ClassicPlotManager {
|
||||
Settings.Paths.TEMPLATES + "/tmp-data.yml",
|
||||
Template.getBytes(hybridPlotWorld)
|
||||
));
|
||||
String dir = "schematics" + File.separator + "GEN_ROAD_SCHEMATIC" + File.separator + hybridPlotWorld.getWorldName() + File.separator;
|
||||
String dir =
|
||||
Settings.Paths.SCHEMATICS + File.separator + "GEN_ROAD_SCHEMATIC" + File.separator + hybridPlotWorld.getWorldName() + File.separator;
|
||||
try {
|
||||
File sideRoad = FileUtils.getFile(PlotSquared.platform().getDirectory(), dir + "sideroad.schem");
|
||||
String newDir = "schematics" + File.separator + "GEN_ROAD_SCHEMATIC" + File.separator + "__TEMP_DIR__" + File.separator;
|
||||
String newDir =
|
||||
Settings.Paths.SCHEMATICS + File.separator + "GEN_ROAD_SCHEMATIC" + File.separator + "__TEMP_DIR__" + File.separator;
|
||||
if (sideRoad.exists()) {
|
||||
files.add(new FileBytes(newDir + "sideroad.schem", Files.readAllBytes(sideRoad.toPath())));
|
||||
}
|
||||
|
@ -517,7 +517,7 @@ public class HybridUtils {
|
||||
final Set<CuboidRegion> sideRoad = Collections.singleton(RegionUtil.createRegion(sx, ex, sy, ey, sz, ez));
|
||||
final Set<CuboidRegion> intersection = Collections.singleton(RegionUtil.createRegion(sx, ex, sy, ty, bz, tz));
|
||||
|
||||
final String dir = "schematics" + File.separator + "GEN_ROAD_SCHEMATIC" + File.separator + plot
|
||||
final String dir = Settings.Paths.SCHEMATICS + File.separator + "GEN_ROAD_SCHEMATIC" + File.separator + plot
|
||||
.getArea()
|
||||
.toString() + File.separator;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user