Improve /spawnentity a bit

This commit is contained in:
Perttu Ahola 2011-12-04 16:20:54 +02:00
parent ea36951bc4
commit 2e67fa3e48

@ -1491,7 +1491,9 @@ minetest.register_on_chat_message(function(name, message)
print("Unable to spawn entity, player is nil") print("Unable to spawn entity, player is nil")
return true -- Handled chat message return true -- Handled chat message
end end
minetest.env:add_entity(player:getpos(), entityname) local p = player:getpos()
p.y = p.y + 1
minetest.env:add_entity(p, entityname)
minetest.chat_send_player(name, '"'..entityname minetest.chat_send_player(name, '"'..entityname
..'" spawned.'); ..'" spawned.');
return true -- Handled chat message return true -- Handled chat message