Minor bug fixes

This commit is contained in:
boy0001 2015-02-27 21:28:16 +11:00
parent 267956ad3c
commit 03dcca451c
3 changed files with 18 additions and 11 deletions

View File

@ -8,7 +8,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<artifactId>PlotSquared</artifactId>
<version>2.8</version>
<version>2.8.1</version>
<name>PlotSquared</name>
<packaging>jar</packaging>
<build>

View File

@ -223,6 +223,9 @@ public class HybridGen extends PlotGenerator {
*/
@Override
public Location getFixedSpawnLocation(final World world, final Random random) {
if (this.plotworld == null) {
return new Location(world, 0, 128, 0);
}
return new Location(world, 0, this.plotworld.ROAD_HEIGHT + 2, 0);
}

View File

@ -149,10 +149,12 @@ public class HybridPop extends BlockPopulator {
setBlock(w, x, (short) (this.plotheight + y), z, blocks.get(y));
}
}
HashSet<PlotItem> states = this.plotworld.G_SCH_STATE.get(loc);
if (states != null) {
for (PlotItem items : states) {
BlockManager.manager.addItems(this.plotworld.worldname, items);
if (this.plotworld.G_SCH_STATE != null) {
HashSet<PlotItem> states = this.plotworld.G_SCH_STATE.get(loc);
if (states != null) {
for (PlotItem items : states) {
BlockManager.manager.addItems(this.plotworld.worldname, items);
}
}
}
}
@ -204,12 +206,14 @@ public class HybridPop extends BlockPopulator {
setBlock(w, x, (short) (this.plotheight + y), z, blocks.get(y));
}
}
HashSet<PlotItem> states = this.plotworld.G_SCH_STATE.get(loc);
if (states != null) {
for (PlotItem items : states) {
items.x = this.X + x;
items.z = this.Z + z;
BlockManager.manager.addItems(this.plotworld.worldname, items);
if (this.plotworld.G_SCH_STATE != null) {
HashSet<PlotItem> states = this.plotworld.G_SCH_STATE.get(loc);
if (states != null) {
for (PlotItem items : states) {
items.x = this.X + x;
items.z = this.Z + z;
BlockManager.manager.addItems(this.plotworld.worldname, items);
}
}
}
}