diff --git a/pom.xml b/pom.xml
index 9e4e70605..b61301194 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
UTF-8
PlotSquared
- 3.2.14
+ 3.2.15
PlotSquared
jar
diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Template.java b/src/main/java/com/intellectualcrafters/plot/commands/Template.java
index 87ec652d6..69bca79d2 100644
--- a/src/main/java/com/intellectualcrafters/plot/commands/Template.java
+++ b/src/main/java/com/intellectualcrafters/plot/commands/Template.java
@@ -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;
diff --git a/src/main/java/com/intellectualcrafters/plot/object/Plot.java b/src/main/java/com/intellectualcrafters/plot/object/Plot.java
index 95f740380..3abcb433c 100644
--- a/src/main/java/com/intellectualcrafters/plot/object/Plot.java
+++ b/src/main/java/com/intellectualcrafters/plot/object/Plot.java
@@ -716,7 +716,7 @@ public class Plot {
}
/**
- * Get the average rating of the plot
+ * Get the average rating of the plot. This is the value displayed in /plot info
* @return average rating as double
*/
public double getAverageRating() {
diff --git a/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java b/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java
index 66e256a9b..7dde4ca6a 100644
--- a/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java
+++ b/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java
@@ -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);
}
diff --git a/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java b/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java
index fdaacb8b9..26e368e3e 100644
--- a/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java
+++ b/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java
@@ -212,19 +212,21 @@ public class BukkitUtil extends BlockManager {
public void functionSetSign(final String worldname, final int x, final int y, final int z, final String[] lines) {
final World world = getWorld(worldname);
final Block block = world.getBlockAt(x, y, z);
- block.setType(Material.AIR);
+ // block.setType(Material.AIR);
block.setTypeIdAndData(Material.WALL_SIGN.getId(), (byte) 2, false);
final BlockState blockstate = block.getState();
if ((blockstate instanceof Sign)) {
+ final Sign sign = (Sign) blockstate;
+ for (int i = 0; i < lines.length; i++) {
+ sign.setLine(i, lines[i]);
+ }
+ sign.update(true);
TaskManager.runTaskLater(new Runnable() {
@Override
public void run() {
- for (int i = 0; i < lines.length; i++) {
- ((Sign) blockstate).setLine(i, lines[i]);
- }
- ((Sign) blockstate).update(true);
+ sign.update(true);
}
- }, 1);
+ }, 20);
}
}
diff --git a/target/PlotSquared-Bukkit.jar b/target/PlotSquared-Bukkit.jar
index 9089c6580..15452430f 100644
Binary files a/target/PlotSquared-Bukkit.jar and b/target/PlotSquared-Bukkit.jar differ