diff --git a/src/main/java/ch/njol/skript/effects/EffBlockUpdate.java b/src/main/java/ch/njol/skript/effects/EffBlockUpdate.java index fcb98ceabce..2b39c3c7482 100644 --- a/src/main/java/ch/njol/skript/effects/EffBlockUpdate.java +++ b/src/main/java/ch/njol/skript/effects/EffBlockUpdate.java @@ -52,7 +52,8 @@ public boolean init(Expression[] exprs, int matchedPattern, Kleenean isDelaye @Override protected void execute(Event event) { BlockData data = this.blockData.getSingle(event); - assert data != null; + if (data == null) + return; for (Block block : this.blocks.getArray(event)) { block.setBlockData(data, this.physics); } diff --git a/src/test/skript/tests/syntaxes/effects/EffBlockUpdate.sk b/src/test/skript/tests/syntaxes/effects/EffBlockUpdate.sk index 557e4867bfa..e0404e3a5f8 100644 --- a/src/test/skript/tests/syntaxes/effects/EffBlockUpdate.sk +++ b/src/test/skript/tests/syntaxes/effects/EffBlockUpdate.sk @@ -3,6 +3,6 @@ test "block update": set {_blocks::*} to blocks in radius 2 of block at {_loc} update blocks at {_blocks::*} as sand without physics updates - assert blocks at {_blocks::*} is sand with "1 or more block did not update with or without physics" + assert blocks at {_blocks::*} is sand with "1 or more blocks did not update with or without physics" update blocks at {_blocks::*} as air without physics updates - assert blocks at {_blocks::*} is air with "1 or more block did not update to air" + assert blocks at {_blocks::*} is air with "1 or more blocks did not update to air"