随机重生
此数据包允许你设置多个重生点。玩家死亡后,将从这些点中随机选择一个进行重生。
用途说明
你可以使用此数据包与朋友一起游玩迷你游戏或 PvP(玩家对战)。
使用方法
首先,你需要设置重生点。有两种设置方式:
- 使用
/function random_spawn:give_spawnpoint/me 命令获取一个盔甲架。将这些盔甲架放置在玩家应该重生的方块上。
- 运行
/function random_spawn:spawnpoint 命令,将你当前站立的位置设置为重生点。
默认情况下,盔甲架是不可见的。要看到它们,你可以切换到旁观者模式,或者运行 /function random_spawn:visible/enable 命令。

⚠️ 警告
重生点对服务器上的所有玩家同时生效。目前无法为每个玩家单独设置重生点。
现在当重生点放置好后,玩家死亡后将在这些点上重生。玩家能在某点重生的条件是:该点周围 10 格半径内不能有其他玩家存在。
切换可见性
启用可见性:
/function random_spawn:visible/enable
启用可见性并额外让盔甲架发光:
/function random_spawn:visible/glow
禁用可见性:
/function random_spawn:visible/disable

删除重生点
删除所有重生点:
/function random_spawn:delete/all
删除 10 格半径内最近的重生点:
/function random_spawn:delete/nearest
你也可以先启用盔甲架的可见性,然后像往常一样通过鼠标左键击杀它们。
其他功能
传送自己到随机重生点:
/function random_spawn:tp
将所有玩家传送到随机重生点:
/function random_spawn:tp_everyone
在聊天栏打印重生点的数量:
/function random_spawn:get_count_spawn
禁用数据包
若要临时禁用此数据包:
/datapack disable "file/random_spawn"
之后若要重新启用:
/datapack enable "file/random_spawn"
命令速查表
| 命令 |
描述 |
| /function random_spawn:give_spawnpoint/me |
给自己盔甲架 |
| /function random_spawn:give_spawnpoint/everyone |
给所有人盔甲架 |
| /function random_spawn:spawnpoint |
设置重生点 |
| /function random_spawn:visible/disable |
禁用可见性 |
| /function random_spawn:visible/enable |
启用可见性 |
| /function random_spawn:visible/glow |
盔甲架发光 |
| /function random_spawn:delete/all |
删除所有重生点 |
| /function random_spawn:delete/nearest |
删除最近的重生点 |
| /function random_spawn:tp |
传送自己到随机重生点 |
| /function random_spawn:tp_everyone |
将所有玩家传送到随机重生点 |
| /function random_spawn:get_count_spawn |
获取重生点数量 |
以下版本不支持此数据包:
- 1.20.5 - 1.20.6
- 1.21.5 - 1.21.10
Discord
在我的 Discord 服务器 上,你可以报告我的数据包中的错误并提出改进建议。你也可以向我订购数据包。
我的其他项目
数据包:
Random Spawn
This datapack allows you to set multiple spawn points. After death, the player will randomly respawn at one of these points.
What is this for?
You can use this datapack to play mini-games and PVP with your friends.
How to use
First, you need to set up spawn points. There are two ways to do this:
- Use the
/function random_spawn:give_spawnpoint/me command to give you an armor stand. Place these armor stands on the blocks where players should spawn.
- Run the
/function random_spawn:spawnpoint command to set a spawn point where you are standing.
Armor stands are invisible by default. To see them, you can switch to spectator mode or run the /function random_spawn:visible/enable command.

⚠️ Warning
Spawn points apply to all players on the server simultaneously. Currently, it's not possible to set spawn points individually for each player.
Now when spawns are placed, players will spawn on them after death. There is one condition for a player to spawn at a point: there must not be a single player within a 10 block radius.
Toggle visibility
Enable visibility:
/function random_spawn:visible/enable
Enable visibility and additionally glow armor stands:
/function random_spawn:visible/glow
Disable visibility:
/function random_spawn:visible/disable

Delete spawn points
Delete all spawn points:
/function random_spawn:delete/all
Delete nearest spawn point within a 10 block radius:
/function random_spawn:delete/nearest
You can also enable visibility of armor stands and kill them as usual via left mouse button.
Additional functions
Teleport yourself to a random spawn:
/function random_spawn:tp
Teleport all players to a random spawns:
/function random_spawn:tp_everyone
Print the number of spawn points in the chat:
/function random_spawn:get_count_spawn
Disable datapack
To temporarily disable the datapack:
/datapack disable "file/random_spawn"
Then to turn it back on:
/datapack enable "file/random_spawn"
Command Cheatsheet
| Command |
Description |
| /function random_spawn:give_spawnpoint/me |
give yourself armor stand |
| /function random_spawn:give_spawnpoint/everyone |
give everyone armor stand |
| /function random_spawn:spawnpoint |
set spawn point |
| /function random_spawn:visible/disable |
disable visibility |
| /function random_spawn:visible/enable |
enable visibility |
| /function random_spawn:visible/glow |
glow armor stand |
| /function random_spawn:delete/all |
delete all spawns |
| /function random_spawn:delete/nearest |
delete nearest spawn |
| /function random_spawn:tp |
teleport yourself to a random spawn |
| /function random_spawn:tp_everyone |
teleport all players to a random spawns |
| /function random_spawn:get_count_spawn |
get the number of spawns |
Versions on which the datapack doesn't work:
- 1.20.5 - 1.20.6
- 1.21.5 - 1.21.10
Discord
On my Discord server, you can report bugs in my datapacks and suggest improvements. You can also order a datapack from me.
My other projects
Datapacks:
- GunGame - Standard Gun Game (Arms Race).
- Minimal hunger - Allows you to set a minimum amount of hunger below which it will not fall.
评论 0
登录后参与评分
还没有评论,来抢沙发吧