minetest.get_player_by_name

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

minetest.get_player_by_name(playername)

Description

Get the PlayerObject (ObjectRef) for the named player.

Example

local player = minetest.get_player_by_name("singleplayer")
player:setpos({x=0, y=0, z=0})
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox