Page 1 of 1

Teleport question

Posted: Wed Oct 30, 2024 02:44
by Peristrephic
Teleportation

Teleportation is the immediate displacement of any player to a given position. All of the following commands require the “teleport” privilege.

/teleport <x>,<y>,<z> - Teleport yourself to given coordinates.
But where do I obtain my present coordinates, for example?
Btw, I did try the command above, replacing the letters for zeroes (<0>, <0>, <0>,) but it replied:
Invalid parameters ("<0>, <0>, <0>,") or player not found :(

Other commands I found had an activation key, like Fly, or Fast. What about Teleport? Does it have one too?

Thanks guys

Re: Teleport question

Posted: Wed Oct 30, 2024 05:46
by Josselin2
/grantme teleport

/teleport 0 0 0
/teleport 1000 20 500

/teleport Peristrephic ToOtherPlayer

Re: Teleport question

Posted: Wed Oct 30, 2024 11:34
by Blockhead
Chat commands are kind of adjacent to programming. In programming there is an established convention* where mandatory parameters go in <> and optional parameters go in [] when describing things. Anything inside the <> ("angle brackets") and [] ("square brackets") needs to be substituted for something else, removing the surrounding brackets. So:

Code: Select all

/teleport <x>,<y>,<z>
Has 3 parts you need to substitute in, and all are mandatory. Their names are x, y and z. Josselin2 gave some good examples.

Another command with an optional parameter is**:

Code: Select all

/last-login [name]
If you leave out the name, it gives you your own last-login time (when you logged into your current play session).

The third thing to learn about is the | ("pipe"). It lists alternative ways to run the command with different parameters. The full in-game help for /teleport lists:

Code: Select all

<X>,<Y>,<Z> | <to_name> | <name> <X>,<Y>,<Z> | <name> <to_name>
That means there are 4 valid ways to use teleport:
  • With 3 coordinates, to teleport yourself.
  • With another player's name, to teleport yourself to that player.
  • With another player's name and coordinates, to teleport them to those coordinates.
  • With two player's names, to teleport one player to another.
It gets more advanced, like including more <> or [] inside each other, but that's the basic idea. I hope that helps.

By the way, you quoted the wiki, which can be helpful, but you can always get the help on all available commands with just /help. It will open a GUI that shows help on all commands, grouped by which mod adds them.

*based on "Backus-Naur form" and EBNF
**The in-game help actually says [<name>], which is an error

Peristrephic wrote:
Wed Oct 30, 2024 02:44
Other commands I found had an activation key, like Fly, or Fast. What about Teleport? Does it have one too?
No, only the actions listed in the controls menu (Press the Escape Key -> Click Controls) have key bindings. Some of them do not have a default binding though, so you may want to bind actions like pitch move, autoforward, or range select (which toggles infinite rendering distance on and off)