forked from Mirrorlandia_minetest/minetest
builtin: Correctly indicate failure in /spawnentity
This commit is contained in:
parent
f6f6dd140f
commit
d3f50f216f
@ -736,8 +736,9 @@ core.register_chatcommand("spawnentity", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
p.y = p.y + 1
|
p.y = p.y + 1
|
||||||
core.add_entity(p, entityname)
|
local obj = core.add_entity(p, entityname)
|
||||||
return true, ("%q spawned."):format(entityname)
|
local msg = obj and "%q spawned." or "%q failed to spawn."
|
||||||
|
return true, msg:format(entityname)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user