mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 19:54:43 +02:00
Fixes
Closes #683 Potential fix for sign issue Potential fix for templates not working Incremented version number.
This commit is contained in:
@ -70,7 +70,7 @@ public class Template extends SubCommand {
|
||||
ZipEntry ze = zis.getNextEntry();
|
||||
while (ze != null) {
|
||||
final String name = ze.getName();
|
||||
final File newFile = new File((output + File.separator + name).replaceAll("__TEMP_DIR__", world));
|
||||
final File newFile = new File((output + File.separator + name.replaceAll("[\\\\|\\|/]", File.separator)).replaceAll("__TEMP_DIR__", world));
|
||||
new File(newFile.getParent()).mkdirs();
|
||||
final FileOutputStream fos = new FileOutputStream(newFile);
|
||||
int len;
|
||||
|
@ -716,7 +716,7 @@ public class Plot {
|
||||
public Location getHome() {
|
||||
return MainUtil.getPlotHome(this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the average rating of the plot. This is the value displayed in /plot info
|
||||
* @return average rating as double
|
||||
|
@ -158,6 +158,7 @@ public abstract class SchematicHandler {
|
||||
RegionWrapper region = MainUtil.getLargestRegion(plot);
|
||||
if ((((region.maxX - region.minX + x_offset) + 1) < WIDTH) || (((region.maxZ - region.minZ + z_offset) + 1) < LENGTH) || (HEIGHT > 256)) {
|
||||
PS.debug("Schematic is too large");
|
||||
PS.debug("(" + WIDTH + "," + LENGTH + "," + HEIGHT + ") is bigger than (" + (region.maxX - region.minX) + "," + (region.maxZ - region.minZ) + ",256)");
|
||||
TaskManager.runTask(whenDone);
|
||||
return;
|
||||
}
|
||||
@ -465,7 +466,7 @@ public abstract class SchematicHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
final File file = new File(PS.get().IMP.getDirectory() + File.separator + "schematics" + File.separator + name + ".schematic");
|
||||
final File file = new File(PS.get().IMP.getDirectory() + File.separator + "schematics" + File.separator + name + (name.endsWith(name) ? "" : ".schematic"));
|
||||
return getSchematic(file);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user