一个简单的数据包,为玩家添加可配置的生命数
可能适用于除 26.3 以外的其他版本,但我没有检查过,抱歉。
功能与指南:
根据玩家剩余的生命数,其头顶和标签列表中的名字颜色会发生变化,标签列表还会显示玩家确切的生命数量。
- 红色:1 条命
- 黄色:2 条命
- 浅绿色:3 或 4 条命
- 深绿色:5 条或更多生命

如果一名处于最后一条命的玩家死亡,闪电将击中其所在位置,并将其置于旁观者模式。
默认情况下,每个人初始拥有 5 条命,可以通过以下命令进行配置:
/scoreboard players set #default lives X
(将 X 替换为所需的生命数量)
要将所有人重置为您设置的默认生命数量,请使用此命令:
/function lucimaw:restartlives
(在更改默认值后应使用此命令,以更新所有玩家的生命计数)
(警告:此命令仅对当前在线的玩家有效,并将任何已死亡/处于旁观者模式的玩家传送到执行命令的人身边,并 obviously 复活他们)
您可以使用以下命令为玩家添加生命:
/scoreboard players add NAME lives X
(将 NAME 替换为目标玩家的名称,并将 X 替换为要添加的生命数量)
您可以使用以下命令从玩家身上移除生命:
/scoreboard players remove NAME lives X
(将 NAME 替换为目标玩家的名称,并将 X 替换为要移除的生命数量)
.
.
.
.
.
.
.
.
.
剧透
主要为我朋友和我制作,但欢迎使用。
完全不是受到 Grian 的生命系列启发。
A simple datapack that adds a configurable amount of lives for players
Probably works for other versions besides 26.3 but i havent checked sorry
Features and guide:
Depending on how many lives a player has, the color of their name changes above their head and on the tab list, the tab list also displays the exact number of lives that a player has
- Red: 1 life
- Yellow: 2 lives
- Light green: 3 or 4 lives
- Dark green: 5 or more lives

If a player on their final life dies, lightning strikes at their location and they are put into spectator mode
By default everyone starts with 5 lives, this can be configured with the following command:
/scoreboard players set #default lives X
(replace X with the desired amount of lives)
To reset everyone to the default amount of lives that you have set, use this command:
/function lucimaw:restartlives
(you should use this after changing the default, in order to update everyones life count)
(warning: this command only works on players currently in the game and will teleport any dead/spectator players to the person running the command, and obviously revive them)
-
Adding or removing lives from players
You can add lives to a player with this command:
/scoreboard players add NAME lives X
(replace NAME with target players username, and replace X with the desired lives to add)
You can remove lives from a player with this command:
/scoreboard players remove NAME lives X
(replace NAME with target players username, and replace X with the desired lives to remove)
.
.
.
.
.
.
.
.
.
Spoiler
mainly made for my friends and i, but feel free to use
totally not inspired by grians life series
评论 0
登录后参与评分
还没有评论,来抢沙发吧