mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26: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>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<artifactId>PlotSquared</artifactId>
|
<artifactId>PlotSquared</artifactId>
|
||||||
<version>3.2.14</version>
|
<version>3.2.15</version>
|
||||||
<name>PlotSquared</name>
|
<name>PlotSquared</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
|
@ -70,7 +70,7 @@ public class Template extends SubCommand {
|
|||||||
ZipEntry ze = zis.getNextEntry();
|
ZipEntry ze = zis.getNextEntry();
|
||||||
while (ze != null) {
|
while (ze != null) {
|
||||||
final String name = ze.getName();
|
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();
|
new File(newFile.getParent()).mkdirs();
|
||||||
final FileOutputStream fos = new FileOutputStream(newFile);
|
final FileOutputStream fos = new FileOutputStream(newFile);
|
||||||
int len;
|
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
|
* @return average rating as double
|
||||||
*/
|
*/
|
||||||
public double getAverageRating() {
|
public double getAverageRating() {
|
||||||
|
@ -158,6 +158,7 @@ public abstract class SchematicHandler {
|
|||||||
RegionWrapper region = MainUtil.getLargestRegion(plot);
|
RegionWrapper region = MainUtil.getLargestRegion(plot);
|
||||||
if ((((region.maxX - region.minX + x_offset) + 1) < WIDTH) || (((region.maxZ - region.minZ + z_offset) + 1) < LENGTH) || (HEIGHT > 256)) {
|
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("Schematic is too large");
|
||||||
|
PS.debug("(" + WIDTH + "," + LENGTH + "," + HEIGHT + ") is bigger than (" + (region.maxX - region.minX) + "," + (region.maxZ - region.minZ) + ",256)");
|
||||||
TaskManager.runTask(whenDone);
|
TaskManager.runTask(whenDone);
|
||||||
return;
|
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);
|
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) {
|
public void functionSetSign(final String worldname, final int x, final int y, final int z, final String[] lines) {
|
||||||
final World world = getWorld(worldname);
|
final World world = getWorld(worldname);
|
||||||
final Block block = world.getBlockAt(x, y, z);
|
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);
|
block.setTypeIdAndData(Material.WALL_SIGN.getId(), (byte) 2, false);
|
||||||
final BlockState blockstate = block.getState();
|
final BlockState blockstate = block.getState();
|
||||||
if ((blockstate instanceof Sign)) {
|
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() {
|
TaskManager.runTaskLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
for (int i = 0; i < lines.length; i++) {
|
sign.update(true);
|
||||||
((Sign) blockstate).setLine(i, lines[i]);
|
|
||||||
}
|
}
|
||||||
((Sign) blockstate).update(true);
|
}, 20);
|
||||||
}
|
|
||||||
}, 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user