aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/nodedb.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/advtrains/nodedb.lua b/advtrains/nodedb.lua
index 7433042..edb3329 100644
--- a/advtrains/nodedb.lua
+++ b/advtrains/nodedb.lua
@@ -133,7 +133,9 @@ end
function ndb.swap_node(pos, node, no_inval)
- minetest.swap_node(pos, node)
+ if minetest.get_node_or_nil(pos) then
+ minetest.swap_node(pos, node)
+ end
ndb.update(pos, node)
end
@@ -294,6 +296,5 @@ minetest.register_chatcommand("at_sync_ndb",
return true, text
end)
end,
- privs = {train_operator=true}, -- Require the "privs" privilege to run
})