Safer generation of the BlockBucketChunk

This commit is contained in:
dordsor21
2019-01-19 16:28:49 +00:00
parent ca883c211a
commit 0609b3d7f6
2 changed files with 22 additions and 4 deletions

View File

@ -74,6 +74,10 @@ public class BukkitHybridUtils extends HybridUtils {
HybridPlotWorld hpw = (HybridPlotWorld) area;
final BlockBucket[][] result = hpw.getBlockBucketChunk();
if (result == null) {
return;
}
if (hpw.PLOT_SCHEMATIC) {
short[] rx = new short[16];
short[] rz = new short[16];
@ -218,7 +222,7 @@ public class BukkitHybridUtils extends HybridUtils {
types.add(now);
}
} catch (NullPointerException e) {
PlotSquared.log(old.toString());
PlotSquared.log(old != null ? old.toString() : "old null");
PlotSquared.log(x);
PlotSquared.log(y);
PlotSquared.log(z);