//replacemix: fix crash caused by invalid invocation

This commit is contained in:
Starbeamrainbowlabs 2021-09-18 12:16:03 +01:00
parent 75d40d7a6c
commit be3166624a
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2
2 changed files with 4 additions and 0 deletions

@ -26,6 +26,7 @@ Note to self: See the bottom of this file for the release template text.
- `moretrees:apple_tree_sapling_ongen` from `apple` to `apple_moretrees`
- Add `plum``plumtree:sapling`
- Add `holly``hollytree:sapling`
- `//replacemix`: Improve error handling to avoid crashes (thanks, Jonathon for reporting via Discord!)
## v1.12: The selection tools update (26th June 2021)

@ -53,6 +53,9 @@ worldedit.register_command("replacemix", {
end
end
end
if not target_node then return false, "Error: No target node specified." end
if not last_node_name then return false, "Error: At least 1 replace node must be specified." end
if not replace_nodes[last_node_name] then
replace_nodes[last_node_name] = 1
end