Page Menu
Home
1F616EMO Bugtracker
Search
Configure Global Search
Log In
Files
F152939
init.lua
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
init.lua
View Options
-- twi_mods/spawn/init.lua
--[[
Copyright (C) 2014-2021 AndrejIT, spfar, mightyjoe781
Copyright (C) 2024 1F616EMO
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
]]
S
=
minetest
.
get_translator
(
"spawn"
)
minetest
.
register_chatcommand
(
"spawn"
,
{
description
=
S
(
"Teleport to spawnpoint"
),
privs
=
{
home
=
true
},
func
=
function
(
name
)
local
player
=
minetest
.
get_player_by_name
(
name
)
if
not
player
then
return
false
end
local
spawn_pos
=
minetest
.
setting_get_pos
(
"static_spawnpoint"
)
if
not
spawn_pos
then
return
false
,
S
(
"Spawn point not set. Consult moderators to set a proper static_spawnpoint."
)
end
player
:
set_pos
(
spawn_pos
)
return
true
,
S
(
"Teleported to Spawn!"
)
end
})
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jan 24 2026, 10:37 AM (5 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
46/9f/0fcc4f45bc66fc0c11e9b0c1921d
Default Alt Text
init.lua (1 KB)
Attached To
Mode
rTWIMODS Survival Server Custom Modifications
Attached
Detach File
Event Timeline
Log In to Comment