Fix schematic on claim/auto

This commit is contained in:
Jesse Boyd 2016-04-05 11:07:37 +10:00
parent 1f32707ec2
commit fab60a0d53
3 changed files with 5 additions and 3 deletions

View File

@ -41,7 +41,9 @@ public class GenChunk extends PlotChunk<Chunk> {
@Override
public void setBiome(int x, int z, int biome) {
this.grid.setBiome(x, z, this.biomes[biome]);
if (this.grid != null) {
this.grid.setBiome(x, z, this.biomes[biome]);
}
}
public void setBiome(int x, int z, Biome biome) {

View File

@ -1301,7 +1301,7 @@ public class Plot {
PlotArea plotworld = getArea();
if (plotworld.SCHEMATIC_ON_CLAIM) {
SchematicHandler.Schematic sch;
if (schematic.isEmpty()) {
if (schematic == null || schematic.isEmpty()) {
sch = SchematicHandler.manager.getSchematic(plotworld.SCHEMATIC_FILE);
} else {
sch = SchematicHandler.manager.getSchematic(schematic);

View File

@ -705,7 +705,7 @@ public abstract class SchematicHandler {
* @return Map of block location to tag
*/
public HashMap<BlockLoc, CompoundTag> getTiles() {
return this.tiles;
return this.tiles == null ? new HashMap<BlockLoc, CompoundTag>() : tiles;
}
/**