简介
本模组添加了一个命令 /rtp,可将玩家随机传送至世界中的任何位置。
命令格式
/rtp
/rtp back
/rtp back <PlayerID>
/rtp <PlayerID> back
/rtp <Radius>
/rtp <PlayerID>
/rtp <Radius> <PlayerID>
/rtp <PlayerID> <Radius>
/rtp <Radius> <OriginPos>
/rtp <Radius> <PlayerID> <OriginEntity>
/rtp <Radius> <PlayerID> <OriginPos>
/rtp <PlayerID> <Radius> <OriginEntity>
/rtp <PlayerID> <Radius> <OriginPos>
/rtp <RegionFromPos> <RegionToPos>
/rtp <RegionFromPos> <RegionToPos> <PlayerID>
/rtp <PlayerID> <RegionFromPos> <RegionToPos>
/rtp <RegionFromEntity> <RegionToEntity>
/rtp <RegionFromEntity> <RegionToEntity> <PlayerID>
命令示例
-
/rtp
将执行命令的玩家传送到以 (0,0) 为中心、半径在 2.9e7 - 1e4 之间随机生成的区域内的一个随机点。
2.9e7 = 29,000,000
10^4 = 10,000
-
/rtp back
将玩家传送回最近一次随机传送前的位置。
注意:此功能保存的前置位置信息仅在游戏(服务器)运行时存在。关闭游戏(服务器)后该信息将会丢失。
-
/rtp back TheWhiteDog9487
将 TheWhiteDog9487 传送回其上一次随机传送前的位置。
-
/rtp TheWhiteDog9487 back
将 TheWhiteDog9487 传送回其上一次随机传送前的位置。
-
/rtp 1000
将玩家传送到以 (0,0) 为中心、半径为 1000 的区域内的一个随机点。
-
/rtp TheWhiteDog9487
将 TheWhiteDog9487 传送到以 (0,0) 为中心、半径在 2.9e7 - 1e4 之间随机生成的区域内的一个随机点。
-
/rtp TheWhiteDog9487 1000
将 TheWhiteDog9487 传送到以 (0,0) 为中心、半径为 1000 的区域内的一个随机点。
-
/rtp 1000 TheWhiteDog9487
将 TheWhiteDog9487 传送到以 (0,0) 为中心、半径为 1000 的区域内的一个随机点。
-
/rtp 1000 10000 10000
将玩家传送到以 (10000,10000) 为中心、半径为 1000 的区域内的一个随机点。
-
/rtp 1000 TheWhiteDog9487 TheWhiteDog_CN
将 TheWhiteDog9487 传送到以 TheWhiteDog_CN 所在位置为中心、半径为 1000 的区域内的一个随机点。
-
/rtp 1000 TheWhiteDog9487 10000 10000
将 TheWhiteDog9487 传送到以 (10000,10000) 为中心、半径为 1000 的区域内的一个随机点。
-
/rtp TheWhiteDog9487 1000 TheWhiteDog_CN
将 TheWhiteDog9487 传送到以 TheWhiteDog_CN 所在位置为中心、半径为 1000 的区域内的一个随机点。
-
/rtp TheWhiteDog9487 1000 10000 10000
将 TheWhiteDog9487 传送到以 (10000,10000) 为中心、半径为 1000 的区域内的一个随机点。
-
/rtp 10000.0 10000.0 20000.0 20000.0
将玩家传送到由顶点 (10000,10000)、(20000,10000)、(20000,20000) 和 (10000,20000) 构成的矩形区域内的一个随机点。
您只需提供矩形的任意一个顶点和其对角线上的另一个顶点即可。
-
/rtp TheWhiteDog9487 10000.0 10000.0 20000.0 20000.0
将 TheWhiteDog9487 传送到上述相同的矩形区域内的一个随机点。
-
/rtp 10000.0 10000.0 20000.0 20000.0 TheWhiteDog9487
将 TheWhiteDog9487 传送到上述相同的矩形区域内的一个随机点。
-
/rtp TheWhiteDog9487 TheWhiteDog_CN
将命令执行者传送到一个矩形区域内的一个随机点,该矩形的对角线分别为 TheWhiteDog9487 和 TheWhiteDog_CN 的当前位置。
-
/rtp TheWhiteDog9487 TheWhiteDog_CN TheWhiteDog4568
将 TheWhiteDog4568 传送到一个矩形区域内的一个随机点,该矩形的对角线分别为 TheWhiteDog9487 和 TheWhiteDog_CN 的当前位置。
特别说明
不存在 /rtp <Radius> <OriginEntity> 这种格式,因为第二个参数既可能是被传送玩家的名称,也可能是用作随机中心的实体。两者都是实体类型,因此无法区分哪一个是哪一个。同理,也不存在 /rtp <PlayerID> <RegionFromEntity> <RegionToEntity> 这种格式,因为所有三个参数都是实体类型,无法确定哪一个是玩家 ID。
依赖项
支持的游戏版本
目前仅活跃支持最新的官方发布版本。
关于玩家权限
遵循原版 /tp 命令的规则,/rtp 被设置为需要 2 级权限。在原版或类似原版的环境中,玩家只需启用作弊权限即可使用它。至于插件服务器,由于我缺乏足够的直接经验,无法就权限设置提供具体建议。
安装在客户端还是服务端?
这取决于具体情况:
- 单人游戏
- 没有物理服务器,因此服务端无关紧要。
- 仅在客户端安装即可。
- 单人游戏 + 开启局域网
- 这使用的是客户端内置的服务器,因此开启局域网世界的玩家需要在其客户端上安装该模组。
- 其他加入的玩家无需安装。
- 专用服务器(例如
server.jar 文件)
- 服务器需要安装该模组。
- 客户端不需要安装。
注意:在第 2 和第 3 种情况下,如果其他玩家未安装此模组,他们将无法看到正确翻译的命令反馈,默认显示为中文文本。如果需要查看多语言翻译文本,最好让所有人都安装它。
Note: This document was originally written in Chinese and translated into other languages using AI. If circumstances permit, it's recommended to read the original Chinese documentation instead of other translated versions.
简体中文(GitHub)
简体中文(Gitea)
English(GitHub)
English(Gitea)
Introduction
This mod adds a command, /rtp, which randomly teleports players to any location in the world.
Command Formats
/rtp
/rtp back
/rtp back <PlayerID>
/rtp <PlayerID> back
/rtp <Radius>
/rtp <PlayerID>
/rtp <Radius> <PlayerID>
/rtp <PlayerID> <Radius>
/rtp <Radius> <OriginPos>
/rtp <Radius> <PlayerID> <OriginEntity>
/rtp <Radius> <PlayerID> <OriginPos>
/rtp <PlayerID> <Radius> <OriginEntity>
/rtp <PlayerID> <Radius> <OriginPos>
/rtp <RegionFromPos> <RegionToPos>
/rtp <RegionFromPos> <RegionToPos> <PlayerID>
/rtp <PlayerID> <RegionFromPos> <RegionToPos>
/rtp <RegionFromEntity> <RegionToEntity>
/rtp <RegionFromEntity> <RegionToEntity> <PlayerID>
Command Examples
-
/rtp
Teleports the player executing the command to a random point within the area centered at (0,0) with a random radius of 2.9e7 - 1e4.
2.9e7 = 29,000,000
10^4 = 10,000
-
/rtp back
Teleports the player back to their position before the most recent random teleport.
Note: The previous-position information saved by this feature exists only while the game (server) is running. It will be lost after the game (server) is closed.
-
/rtp back TheWhiteDog9487
Teleports TheWhiteDog9487 back to their position before their last random teleport.
-
/rtp TheWhiteDog9487 back
Teleports TheWhiteDog9487 back to their position before their last random teleport.
-
/rtp 1000
Teleports the player to a random point within a radius of 1000 centered at (0,0).
-
/rtp TheWhiteDog9487
Teleports TheWhiteDog9487 to a random point within the area centered at (0,0) with a random radius of 2.9e7 - 1e4.
-
/rtp TheWhiteDog9487 1000
Teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at (0,0).
-
/rtp 1000 TheWhiteDog9487
Teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at (0,0).
-
/rtp 1000 10000 10000
Teleports the player to a random point within a radius of 1000 centered at (10000,10000).
-
/rtp 1000 TheWhiteDog9487 TheWhiteDog_CN
Teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at TheWhiteDog_CN's location.
-
/rtp 1000 TheWhiteDog9487 10000 10000
Teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at (10000,10000).
-
/rtp TheWhiteDog9487 1000 TheWhiteDog_CN
Teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at TheWhiteDog_CN's location.
-
/rtp TheWhiteDog9487 1000 10000 10000
Teleports TheWhiteDog9487 to a random point within a radius of 1000 centered at (10000,10000).
-
/rtp 10000.0 10000.0 20000.0 20000.0
Teleports the player to a random point within the rectangular region formed by the vertices (10000,10000), (20000,10000), (20000,20000), and (10000,20000).
You only need to provide any one vertex of the rectangle and the diagonally opposite vertex.
-
/rtp TheWhiteDog9487 10000.0 10000.0 20000.0 20000.0
Teleports TheWhiteDog9487 to a random point within the same rectangular region described above.
-
/rtp 10000.0 10000.0 20000.0 20000.0 TheWhiteDog9487
Teleports TheWhiteDog9487 to a random point within the same rectangular region described above.
-
/rtp TheWhiteDog9487 TheWhiteDog_CN
Teleports the command executor to a random point within a rectangular region whose diagonals are the current positions of TheWhiteDog9487 and TheWhiteDog_CN.
-
/rtp TheWhiteDog9487 TheWhiteDog_CN TheWhiteDog4568
Teleports TheWhiteDog4568 to a random point within a rectangular region whose diagonals are the current positions of TheWhiteDog9487 and TheWhiteDog_CN.
Special Notes
The format /rtp <Radius> <OriginEntity> does not exist because the second parameter could be either the teleported player's name or the entity used as the random center. Both are entity types, so there is no way to tell which one it is. Likewise, /rtp <PlayerID> <RegionFromEntity> <RegionToEntity> does not exist either, because all three parameters are entity types, making it impossible to determine which one is the player ID.
Dependencies
Supported Game Versions
Currently, only the latest official release is actively supported.
About Player Permissions
Following the vanilla /tp command, /rtp is set to require permission level 2. In vanilla or vanilla-like environments, players only need cheat permissions enabled to use it. As for plugin servers, I do not have enough firsthand experience to give specific advice about permission setup.
Install on the Client or on the Server?
It depends on the case:
- Singleplayer
- There is no physical server, so the server side does not matter.
- Installing it on the client is enough.
- Singleplayer + Open to LAN
- This uses the client’s built-in server, so the player who opens the LAN world needs the mod installed on their client.
- Other players who join do not need to install it.
- Dedicated server (something like a
server.jar file)
- The server needs the mod installed.
- Clients do not need it.
Note: In cases 2 and 3, if other players do not install this mod, they will not be able to see the command feedback in the correct translated language, and the default display in that case is Chinese text. If you need to view multilingual translation text, it is probably best for everyone to install it.
评论 0
登录后参与评分
还没有评论,来抢沙发吧