forked from github-mirror/CoreProtect
Fixed NullPointerException when performing a preview with invalid data (fixes #862)
This commit is contained in:
1 parent
7caa617a34
commit
127170d7b6
2 files changed
+7
No files matched your search
@@ -165,6 +165,9 @@ public class BlockUtils {
|
||||
if (blockData == null) {
|
||||
blockData = createBlockData(type);
|
||||
}
|
||||
if (blockData == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!update) {
|
||||
setTypeAndData(block, type, blockData, update);
|
||||
|
||||
@@ -21,6 +21,10 @@ public class Util extends Queue {
|
||||
}
|
||||
|
||||
public static void sendBlockChange(Player player, Location location, BlockData blockData) {
|
||||
if (blockData == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendBlockChange(location, blockData);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user