Compatibility
Minecraft: Java Edition
Platforms
Supported environments
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Links
Creators
Details
Tip: This description has been translated from the Chinese source text using DeepL, if necessary, it is recommended to view the source text.
如果你能看懂这段文字,那么我建议你点下面这个链接,去Github看用中文写的模组介绍。
Chinese source text hosted on Github
如果你的网络环境无法稳定访问Github,那你可以试试下面这个链接,这是我自己部署的Gitea服务器上创建的镜像仓库
Gitea mirror
Introduction
This mod adds a command (/rtp) to randomly teleport the player to any location in the world.
Command Format
- /rtp
- /rtp <Radius>
- /rtp <PlayerID>
- /rtp <Radius> <PlayerID>
- /rtp <PlayerID> <Radius>
- /rtp <Radius> <OriginPos(RandomCentre, Coordinates)>
- /rtp <Radius> <TransportedPlayerID> <OriginEntity(RandomCentre, Entity)>
- /rtp <Radius> <TransportedPlayerID)> <OriginPos(RandomCentre, Coordinate)>
- /rtp <PlayerID> <Radius> <OriginEntity(RandomCentre, Entity)>
- /rtp <PlayerID> <Radius> <OriginPos(RandomCentre, Coordinate)>
Command example
-
/rtp
Randomly teleport the player who executes the command to a random point within a random radius of 2.9e7 - 1e4, with (0,0) as the centre.
2.9e+7 = 2.9 x 10^7 = 29000000 = twenty-nine million
1e4 = 10^4 = 10000 = ten thousand -
/rtp 1000
Randomly teleports the player executing the command to a random point centred at (0,0) with a random radius of 1000. -
/rtp TheWhiteDog9487
Sends TheWhiteDog9487 to a random point within a random radius of 2.9e7 - 1e4, centred at (0,0). -
/rtp TheWhiteDog9487 1000
Send TheWhiteDog9487 to a random point centred at (0,0) with a random radius of 1000. -
/rtp 1000 TheWhiteDog9487
Send TheWhiteDog9487 to a random point centred at (0,0) with a random radius of 1000. -
/rtp 1000 10000 10000
Randomly sends the player executing the command to a random point centred at (10000,10000) with a random radius of 1000. -
/rtp 1000 TheWhiteDog9487 TheWhiteDog_CN
Sends TheWhiteDog9487 to a random point within a random radius of 1000 from the centre of TheWhiteDog_CN's location. -
/rtp 1000 TheWhiteDog9487 10000 10000
Send TheWhiteDog9487 to a random point centred at (10000,10000) with a random radius of 1000. -
/rtp TheWhiteDog9487 1000 TheWhiteDog_CN
Send TheWhiteDog9487 to a random point within a random radius of 1000, centred on TheWhiteDog_CN. -
/rtp TheWhiteDog9487 1000 10000 10000
Sends TheWhiteDog9487 to a random point centred on (10000,10000) with a random radius of 1000.
Special note
/rtp <Radius> <Origin> This format does not exist.
This is because the second parameter could be the name of the player being teleported, or it could be the entity doing the random centre point.
Both are entity types, and there is no way to tell which one is which, and there is ambiguity.
dependencies
Since I'm using CommandRegistrationCallback.EVENT in fabric.api.command.v2 to register commands with the game, this mod needs to rely on the Fabric API
About player permissions
I referenced the vanilla /tp command and set a level 2 permission requirement for /rtp.
If it's vanilla or vanilla-like, you only need to give the player permission to cheat for it to work.
The plugin server side of those specific permission assignments, since I haven't played it myself so I can't give a reference.
Installed on client or server?
There are the following scenarios:
- single player
- the physical server does not exist, so the server is not important.
- Client-side installation is sufficient
- Single player + Open LAN
- use the built-in server of the client, the client of the player in the open LAN needs to be installed.
- other players who join the game do not need to install it
- use a standalone server (similar to server.jar file)
- server needs to be installed
- the client does not need to be installed
Note: In cases 2 and 3, other players can use the function without installing this mod. However, since the feedback result text after the command execution uses translation, if other players do not install the mod, it will cause abnormal display. Players will directly see the translation key instead of the corresponding text. Therefore, although it is possible, it is not recommended for others not to install it. If you can install it, you should install it.