aboutsummaryrefslogtreecommitdiff
path: root/clientmods/commands/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'clientmods/commands/init.lua')
-rw-r--r--clientmods/commands/init.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/clientmods/commands/init.lua b/clientmods/commands/init.lua
index 4ea8d04f6..71328e9ed 100644
--- a/clientmods/commands/init.lua
+++ b/clientmods/commands/init.lua
@@ -8,12 +8,12 @@ minetest.register_chatcommand("say", {
minetest.register_chatcommand("teleport", {
params = "<X>,<Y>,<Z>",
- description = "Teleport to position. " .. (core.anticheat_protection and "Only works for short distances." or ""),
+ description = "Teleport to relative coordinates. " .. (core.anticheat_protection and "Only works for short distances." or ""),
func = function(param)
- local success, pos = core.parse_pos(param)
+ local success, pos = minetest.parse_relative_pos(param)
if success then
- core.localplayer:set_pos(pos)
- return true, "Teleporting to " .. core.pos_to_string(pos)
+ minetest.localplayer:set_pos(pos)
+ return true, "Teleporting to " .. minetest.pos_to_string(pos)
end
return false, pos
end,