Select Git revision

Peter Nerlich authored
new structure, add many blocks to be ignored by trains, add /spawn command, warn if default password
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
spawn.lua 656 B
-- stolen from pandorabox.io https://github.com/pandorabox-io/pandorabox_custom
local spawn_command = {}
spawn_command.pos = {x=-130, y=13, z=-62}
if minetest.setting_get_pos("static_spawnpoint") then
spawn_command.pos = minetest.setting_get_pos("static_spawnpoint")
end
local function teleport_to_spawn(name)
local player = minetest.get_player_by_name(name)
if player == nil then
return false
end
player:setpos(spawn_command.pos)
minetest.chat_send_player(name, "Teleported to spawn!")
end
minetest.register_chatcommand("spawn", {
description = "Teleports you to the spawn point.",
func = teleport_to_spawn,
})