Added two commands for random teleportation
Note: This document was translated from Chinese. If conditions permit, it is recommended to read the original Chinese version.
如果你能看懂这段文字,那么我建议你点下面这个链接,去Github看用中文写的模组介绍。
Chinese source text hosted on Github
如果你的网络环境无法稳定访问Github,那你可以试试下面这个链接,这是我自己部署的Gitea服务器上创建的镜像仓库
Gitea mirror
This mod adds a command /rtp, which is used to randomly teleport players to any location in the world.
/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>/rtp(0,0)./rtp 1000(0,0)./rtp TheWhiteDog9487(0,0)./rtp TheWhiteDog9487 1000(0,0)./rtp 1000 TheWhiteDog9487(0,0)./rtp 1000 10000 10000(10000,10000)./rtp 1000 TheWhiteDog9487 TheWhiteDog_CN/rtp 1000 TheWhiteDog9487 10000 10000(10000,10000)./rtp TheWhiteDog9487 1000 TheWhiteDog_CN/rtp TheWhiteDog9487 1000 10000 10000(10000,10000)./rtp 10000 10000 20000 20000(10000,10000), (20000,10000), (20000,20000), and (10000,20000)./rtp TheWhiteDog9487 10000 10000 20000 20000(10000,10000), (20000,10000), (20000,20000), and (10000,20000)./rtp 10000 10000 20000 20000 TheWhiteDog9487(10000,10000), (20000,10000), (20000,20000), and (10000,20000)./rtp TheWhiteDog9487 TheWhiteDog_CN/rtp TheWhiteDog9487 TheWhiteDog_CN TheWhiteDog4568The 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.
Fabric API
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.
Depending on the situation:
Single Player
Single Player + Open to LAN
Using a Dedicated Server (e.g., server.jar)
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.