PlayersBedrockEducation
/getlocalplayername
Show the local player's name (Bedrock).
Syntax
Command builder
/getlocalplayername takes no arguments — copy and run it as-is.
Examples
Print the local player's name.
Permission level
/getlocalplayername requires Cheats (op level 2). In single-player you need the world's "Allow Cheats" toggle on. On a multiplayer server you need to be opped — see /op.