mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fixes #1221 (the NPE at least)
This commit is contained in:
parent
f20ef15774
commit
7da0b9877f
@ -82,20 +82,22 @@ public class BukkitLocalQueue<T> extends BasicLocalBlockQueue<T> {
|
|||||||
if (blocksLayer != null) {
|
if (blocksLayer != null) {
|
||||||
for (int j = 0; j < blocksLayer.length; j++) {
|
for (int j = 0; j < blocksLayer.length; j++) {
|
||||||
PlotBlock block = blocksLayer[j];
|
PlotBlock block = blocksLayer[j];
|
||||||
int x = MainUtil.x_loc[layer][j];
|
if (block != null) {
|
||||||
int y = MainUtil.y_loc[layer][j];
|
int x = MainUtil.x_loc[layer][j];
|
||||||
int z = MainUtil.y_loc[layer][j];
|
int y = MainUtil.y_loc[layer][j];
|
||||||
Block existing = chunk.getBlock(x, y, z);
|
int z = MainUtil.y_loc[layer][j];
|
||||||
int existingId = existing.getTypeId();
|
Block existing = chunk.getBlock(x, y, z);
|
||||||
if (existingId == block.id) {
|
int existingId = existing.getTypeId();
|
||||||
if (existingId == 0) {
|
if (existingId == block.id) {
|
||||||
continue;
|
if (existingId == 0) {
|
||||||
}
|
continue;
|
||||||
if (existing.getData() == block.data) {
|
}
|
||||||
continue;
|
if (existing.getData() == block.data) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
existing.setTypeIdAndData(block.id, block.data, false);
|
||||||
}
|
}
|
||||||
existing.setTypeIdAndData(block.id, block.data, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user