mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fixes
Closes #683 Potential fix for sign issue Potential fix for templates not working Incremented version number.
This commit is contained in:
parent
6650ea2a4c
commit
e20e4a8650
2
pom.xml
2
pom.xml
@ -8,7 +8,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<artifactId>PlotSquared</artifactId>
|
||||
<version>3.2.14</version>
|
||||
<version>3.2.15</version>
|
||||
<name>PlotSquared</name>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
|
@ -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 {
|
||||
}
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user