/transfer
< Commands
For the old version of this command on Bedrock Edition, see Commands/transferserver.
For the former command on Minecraft Education, see Commands/transfer (Education).
/transfer| Permission level required |
|
|---|---|
| Restrictions |
Dedicated server |
{
"title": "<code>/transfer</code>",
"rows": [
{
"field": "\n* 3 <sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Java Edition\">(link to Java Edition article, displayed as JE) only</span></i>]</sup>\n* 4 <sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "Dedicated server<br>(link to Options article, displayed as Cheat) only<sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Triggers a transfer of a player to another server.
Syntax
- Java Edition
transfer <hostname> [<port>] [<players>]
- Bedrock Edition
transfer <pfidOrMSA: string> <server: string> <port: int>
Arguments
BE: pfidOrMSA: string: basic_string
- The player to transfer. Can be the microsoft account name (player name), or the PlayFab ID (shown when a player joins in or disconnects from the server).
- Must be a string. And it must be a single word that has no space or a double-quoted string (When quoted,
\can be used to escape characters).
JE: <hostname>: string
BE: server: string: basic_string
- Describes the hostname of the server to connect to.
- Must be a string. In Java Edition, it must be a quotable phrase, which is either a single word (allowed characters:
-,+,.,_,A-Z,a-z, and0-9) or a quoted string (by"or'). In Bedrock Edition, it must be a single word that has no space or a double-quoted string (When quoted,\can be used to escape characters).
JE: <port>: integer
BE: port: int: int
- Denotes the port number of the server to connect to. In Java Edition, if not specified, defaults to
25565. - Must be a [Int]32-bit integer number (from -2147483648 (-231) to 2147483647 (231-1) ). In Java Edition, it must be between 1 and 65535 (inclusive). In Bedrock Edition, it should be between 0 and 65535 (inclusive).
- The player(s) to transfer. If not specified, defaults to the executor player.
- Must be a player name, a target selector or a UUID. And the target selector must be of player type.
Result
| Command | Trigger | Java Edition | Bedrock Edition |
|---|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable | Unparseable |
<players> is not specified when the command's executor is not a player. | Failed | N/A | |
<players> fails to resolve to one or more online players. | |||
| Cannot find the specified player in the current server. | N/A | Failed | |
| The port is lower than 0 or higher than 65535. | |||
| Otherwise | Successful | ||
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | 0 | 0 | 0 |
/transfer <hostname> <port> | On success | 1 | 1 | 1 | |
/transfer <hostname> <port> <players> | On success | 1 | 1 | the number of targeted players. |
Examples
- In Java Edition, transfer the player executing the command to port
1630of the serverlocalhost:transfer localhost 1630. - In Java Edition, transfer the player Steve to the server
minecraft.server.example:25565:transfer minecraft.server.example 25565 Steve. - In Bedrock Edition, transfer the player Steve to the server
minecraft.server.example:19132:transfer Steve minecraft.server.example 19132
History
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.20.5 | 24w04a | Added /transfer. | |||||
| Bedrock Edition | |||||||
| 1.20.30 | Preview 1.20.30.22 | Added /transfer. | |||||