
Note: This document was translated from Chinese. If conditions permit, it is recommended to read the original Chinese version.
如果你能看懂这段文字,那么我建议你点下面这个链接,去Github看用中文写的模组介绍。
如果你的网络环境无法稳定访问Github,那你可以试试下面这个链接,这是我自己部署的Gitea服务器上创建的镜像仓库
Gitea mirror
Introduction
This mod adds a command /rtp, which is used to randomly teleport players to any location in the world.
Command Formats
/rtp/rtp <radius>/rtp <player_id>/rtp <radius> <player_id>/rtp <player_id> <radius>/rtp <radius> <center_coordinates>/rtp <radius> <player_id> <center_entity>/rtp <radius> <player_id> <center_coordinates>/rtp <player_id> <radius> <center_entity>/rtp <player_id> <radius> <center_coordinates>/rtp <start_coordinates> <end_coordinates>/rtp <player_id> <start_coordinates> <end_coordinates>/rtp <start_coordinates> <end_coordinates> <player_id>/rtp <start_entity> <end_entity>/rtp <start_entity> <end_entity> <player_id>
Command Examples
/rtpRandomly teleports the player executing the command to a random point within a radius of 2.9e7 - 1e4 centered at(0,0)./rtp 1000Randomly teleports the player executing the command to a random point within a radius of 1000 centered at(0,0)./rtp TheWhiteDog9487Randomly teleports TheWhiteDog9487 to a random point within a radius of 2.9e7 - 1e4 centered at(0,0)./rtp TheWhiteDog9487 1000Randomly teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at(0,0)./rtp 1000 TheWhiteDog9487Randomly teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at(0,0)./rtp 1000 10000 10000Randomly teleports the player executing the command to a random point within a radius of 1000 centered at(10000,10000)./rtp 1000 TheWhiteDog9487 TheWhiteDog_CNRandomly teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at the current location of TheWhiteDog_CN./rtp 1000 TheWhiteDog9487 10000 10000Randomly teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at(10000,10000)./rtp TheWhiteDog9487 1000 TheWhiteDog_CNRandomly teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at the current location of TheWhiteDog_CN./rtp TheWhiteDog9487 1000 10000 10000Randomly teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at(10000,10000)./rtp 10000 10000 20000 20000Randomly teleports the player executing the command to a random point within the rectangular area formed by the four vertices:(10000,10000),(20000,10000),(20000,20000), and(10000,20000). You need to provide the coordinates of any vertex of this rectangle and its corresponding diagonally opposite vertex./rtp TheWhiteDog9487 10000 10000 20000 20000Randomly teleports TheWhiteDog9487 to a random point within the rectangular area formed by the four vertices:(10000,10000),(20000,10000),(20000,20000), and(10000,20000)./rtp 10000 10000 20000 20000 TheWhiteDog9487Randomly teleports TheWhiteDog9487 to a random point within the rectangular area formed by the four vertices:(10000,10000),(20000,10000),(20000,20000), and(10000,20000)./rtp TheWhiteDog9487 TheWhiteDog_CNRandomly teleports the command executor to a random point within the rectangular area where the diagonal is formed by the current positions of TheWhiteDog9487 and TheWhiteDog_CN./rtp TheWhiteDog9487 TheWhiteDog_CN TheWhiteDog4568Randomly teleports TheWhiteDog4568 to a random point within the rectangular area where the diagonal is formed by the current positions of TheWhiteDog9487 and TheWhiteDog_CN.
Special Note
The format /rtp <radius> <center_entity> does not exist.
This is because the second parameter could be either the teleported player's name or the entity serving as the center point.
Since both are entity types, they cannot be distinguished, leading to ambiguity.
Similarly, the format /rtp <player_id> <start_entity> <end_entity> does not exist.
All three parameters are entity types, making it impossible to determine whether the player_id is the first or the third parameter.
Dependencies
Fabric API
Player Permissions
Following the vanilla /tp command, I have set a permission level requirement of 2 for /rtp.
In vanilla or vanilla-like environments, players only need "cheat" permissions to use it.
Regarding specific permission distribution on plugin servers, I cannot provide specific advice as I have not used them.
Install on Client or Server?
Depending on the situation:
-
Single Player
- A physical server does not exist, so you don't need to worry about it.
- Just install it on the client.
-
Single Player + Open to LAN
- The player who uses the built-in client server and opens the LAN needs to have it installed.
- Other players joining the game do not need to install it.
-
Using a Dedicated Server (e.g.,
server.jar)- The server needs to have it installed.
- Clients do not need to install it.
Note: In cases 2 and 3, if other players do not install this mod, the command feedback they see will not correctly use translations, and in such cases, Chinese text will be displayed by default.
If you need to view multi-language translated text, it is recommended that everyone installs it.