mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 03:23:45 +01:00
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
|
||||
p.y = p.y + 1
|
||||
core.add_entity(p, entityname)
|
||||
return true, ("%q spawned."):format(entityname)
|
||||
local obj = core.add_entity(p, entityname)
|
||||
local msg = obj and "%q spawned." or "%q failed to spawn."
|
||||
return true, msg:format(entityname)
|
||||
end,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user