Skip to content

GameProcessManager API command

XiaoColorful edited this page Apr 18, 2026 · 3 revisions

English

游戏进程管理器

IGameProcessManager

/battleroyale api gameProcessManager [...]

检查并更新游戏停止状态

/battleroyale api gameProcessManager checkIfGameShouldEndAndFinish

更新游戏停止状态

/battleroyale api gameProcessManager finishGameIfShouldEnd

  • 若不在游戏中,返回值为 0
  • 立即检查游戏胜利条件及结束条件
  • 返回值:执行后是否不在游戏中(该指令是否成功结束游戏)

游戏管理

IGameManagement

检查并更新无效游戏玩家

/battleroyale api gameProcessManager checkAndUpdateInvalidGamePlayer

立即更新最后记录的游戏玩家状态,淘汰无效玩家

  • 返回值:1
游戏中传送至大厅

/battleroyale api gameProcessManager teleportToLobbyInGame [player]

  • player:实体选择器
  • 若实体选择器不为生物,返回值为 0
  • 传送玩家至大厅,如果正在游戏中则淘汰
  • 返回值:1
游戏后传送

/battleroyale api gameProcessManager teleportAfterGame [teleportWinner] [teleportNonWinner]

  • 若无法获取游戏维度,返回值为 0
  • 若在游戏中,将不会传送
  • teleportWinner:是否传送获胜游戏玩家
  • teleportNonWinner:是否传送非获胜游戏玩家
  • 若不传送,则改为发送传送消息
  • 返回值:1
观战游戏

/battleroyale api gameProcessManager spectateGame [player]

  • player:实体选择器
  • 若实体选择器不为玩家,返回值为 0
  • 返回值:是否成功观战
治疗全体游戏玩家

/battleroyale api gameProcessManager healGamePlayers

  • 若无法获取游戏维度,返回值为 0
  • 返回值:1
结算并添加获胜者

/battleroyale api gameProcessManager finishGameAddWinner [hasWinner]

  • 若不在游戏中,返回值为 0
  • 按获胜条件添加获胜游戏玩家和获胜游戏队伍
  • 返回值:执行后是否不在游戏中(该指令是否成功结束游戏)

游戏通知

IGameNotification

发送获胜结果

/battleroyale api gameProcessManager sendWinnerResult

  • 若无法获取游戏维度,返回值为 0
  • 返回值:1
通知获胜者

/battleroyale api gameProcessManager notifyWinner [player] [id]

  • player:用实体选择器选中并获取游戏玩家
  • 若不存在对应的游戏玩家,返回值为 0
  • id:粒子配置id
  • 返回值:1
发送观战消息

/battleroyale api gameProcessManager sendGameSpectateMessage [player] [allowSpectate]

  • player:实体选择器
  • 若实体选择器不为玩家,返回值为 0
  • allowSpectate:是否允许观战
  • 返回值:1
发送倒地消息

/battleroyale api gameProcessManager sendDownMessage byPlayer [player]

/battleroyale api gameProcessManager sendDownMessage byId [id]

  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏玩家ID获取游戏玩家
  • 若不存在对应的游戏玩家,返回值为 0
  • 发送该游戏玩家倒地消息
  • 返回值:1
发送复活消息

/battleroyale api gameProcessManager sendReviveMessage byPlayer [player]

/battleroyale api gameProcessManager sendReviveMessage byId [id]

  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏玩家ID获取游戏玩家
  • 若不存在对应的游戏玩家,返回值为 0
  • 发送该游戏玩家复活消息
  • 返回值:1
发送淘汰消息

/battleroyale api gameProcessManager sendEliminateMessage byPlayer [player]

/battleroyale api gameProcessManager sendEliminateMessage byId [id]

  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏玩家ID获取游戏玩家
  • 若不存在对应的游戏玩家,返回值为 0
  • 发送该游戏玩家淘汰消息
  • 返回值:1

游戏进程管理器(死斗模式)

IDeathMatchProcessManager

/battleroyale api gameProcessManager deathMatch [...]

死斗模式信息获取

IDeathMatchInfoGetter

获取当前最大击杀数

/battleroyale api gameProcessManager deathMatch getCurrentMaxKill

  • 返回值:当前最大游戏玩家或游戏队伍击杀数

死斗模式数据管理

IDeathMatchDataManagement

添加游戏玩家击杀数

/battleroyale api gameProcessManager deathMatch addGamePlayerKill [addKill] byPlayer [player]

/battleroyale api gameProcessManager deathMatch addGamePlayerKill [addKill] byId [id]

  • addKill:添加的击杀数
  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏玩家ID获取游戏玩家
  • 若不存在对应的游戏玩家,返回值为 -2
  • 返回值:是否计入成功
添加游戏队伍击杀数

/battleroyale api gameProcessManager deathMatch addGameTeamKill [addKill] byPlayer [player]

/battleroyale api gameProcessManager deathMatch addGameTeamKill [addKill] byId [id]

  • addKill:添加的击杀数
  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏队伍ID选中游戏队伍
  • 若不存在对应的游戏玩家或游戏队伍,返回值为 -2
  • 返回值:是否计入成功
添加并跟踪再出生玩家

/battleroyale api gameProcessManager deathMatch addAndTrackRestandingGamePlayer byPlayer [player]

/battleroyale api gameProcessManager deathMatch addAndTrackRestandingGamePlayer byId [id]

  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏玩家ID获取游戏玩家
  • 若不存在对应的游戏玩家,返回值为 -2
  • 返回值:是否添加成功

死斗模式游戏管理

IDeathMatchGameManagement

再出生玩家

/battleroyale api gameProcessManager deathMatch respawnGamePlayer byPlayer [player]

/battleroyale api gameProcessManager deathMatch respawnGamePlayer byId [id]

  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏玩家ID获取游戏玩家
  • 若不存在对应的游戏玩家,返回值为 -2
  • 返回值:是否成功再出生

English

Game process manager

IGameProcessManager

/battleroyale api IGameProcessManager [...]

Check if game should end and finish

/battleroyale api gameProcessManager checkIfGameShouldEndAndFinish

Finish game if should end

/battleroyale api gameProcessManager finishGameIfShouldEnd

  • If the game is not in progress, the return value is 0.
  • Immediately checks game victory and ending conditions.
  • return value: whether the game is not in progress after execution (whether this command successfully ended the game)

Game management

IGameManagement

Check and update invalid game player

/battleroyale api gameProcessManager checkAndUpdateInvalidGamePlayer

Immediately updates the last recorded status of game players and eliminates invalid players:

  • return value: 1
Teleport to lobby in game

/battleroyale api gameProcessManager teleportToLobbyInGame [player]

  • player: entity selector
  • If the entity selector is not a living entity, the return value is 0.
  • Teleports the player to the lobby, eliminate the game player if the game is in progress.
  • return value: 1
Teleport after game

/battleroyale api gameProcessManager teleportAfterGame [teleportWinner] [teleportNonWinner]

  • If the game dimension cannot be retrieved, the return value is 0.
  • If the game is in progress, teleportation will not occur.
  • teleportWinner: whether to teleport winner game players
  • teleportNonWinner: whether to teleport non-winner game players
  • if teleportation is disabled, a teleport message will be sent instead
  • return value: 1
Spectate game

/battleroyale api gameProcessManager spectateGame [player]

  • player: entity selector
  • If the entity selector is not a player, the return value is 0.
  • return value: whether spectating was successfully enabled
Heal game players

/battleroyale api gameProcessManager healGamePlayers

  • If the game dimension cannot be retrieved, the return value is 0.
  • return value: 1
Finish game add winner

/battleroyale api gameProcessManager finishGameAddWinner [hasWinner]

  • If the game is not in progress, the return value is 0.
  • Adds winner game players and teams based on victory conditions.
  • return value: whether the game is not in progress after execution (whether this command successfully ended the game)

Game notification

IGameNotification

Send winner result

/battleroyale api gameProcessManager sendWinnerResult

  • If the game dimension cannot be retrieved, the return value is 0.
  • return value: 1
Notify winner

/battleroyale api gameProcessManager notifyWinner [player] [id]

  • player: selects game player using an entity selector
  • If the corresponding game player does not exist, the return value is 0.
  • id: Particle config id
  • return value: 1
Send spectate message

/battleroyale api gameProcessManager sendGameSpectateMessage [player] [allowSpectate]

  • player: entity selector
  • If the entity selector is not a player, the return value is 0.
  • allowSpectate: whether spectating is allowed
  • return value: 1
Send down message

/battleroyale api gameProcessManager sendDownMessage byPlayer [player]

/battleroyale api gameProcessManager sendDownMessage byId [id]

  • player: selects game player using an entity selector
  • id: selects game player using a game player ID
  • If the corresponding game player does not exist, the return value is 0.
  • Sends the "downed" message for the specified game player.
  • return value: 1
Send revive message

/battleroyale api gameProcessManager sendReviveMessage byPlayer [player]

/battleroyale api gameProcessManager sendReviveMessage byId [id]

  • player: selects game player using an entity selector
  • id: selects game player using a game player ID
  • If the corresponding game player does not exist, the return value is 0.
  • Sends the "revived" message for the specified game player.
  • return value: 1
Send eliminate message

/battleroyale api gameProcessManager sendEliminateMessage byPlayer [player]

/battleroyale api gameProcessManager sendEliminateMessage byId [id]

  • player: selects game player using an entity selector
  • id: selects game player using a game player ID
  • If the corresponding game player does not exist, the return value is 0.
  • Sends the "eliminated" message for the specified game player.
  • return value: 1

Game process manager (DeathMatch)

IDeathMatchProcessManager

/battleroyale api gameProcessManager deathMatch [...]

DeathMatch info getter

IDeathMatchInfoGetter

Get current max kill

/battleroyale api gameProcessManager deathMatch getCurrentMaxKill

  • return value: the current maximum number of kills among game players or teams

DeathMatch data management

IDeathMatchDataManagement

Add game player kill

/battleroyale api gameProcessManager deathMatch addGamePlayerKill [addKill] byPlayer [player]

/battleroyale api gameProcessManager deathMatch addGamePlayerKill [addKill] byId [id]

  • addKill: the number of kills to add
  • player: selects game player using an entity selector
  • id: selects game player using a game player ID
  • If the game player does not exist, the return value is -2.
  • return value: whether the record was successfully added
Add game team kill

/battleroyale api gameProcessManager deathMatch addGameTeamKill [addKill] byPlayer [player]

/battleroyale api gameProcessManager deathMatch addGameTeamKill [addKill] byId [id]

  • addKill: the number of kills to add
  • player: selects game player using an entity selector
  • id: selects game team using a game team ID
  • If the game player or team does not exist, the return value is -2.
  • return value: whether the record was successfully added
Add and track restanding game player

/battleroyale api gameProcessManager deathMatch addAndTrackRestandingGamePlayer byPlayer [player]

/battleroyale api gameProcessManager deathMatch addAndTrackRestandingGamePlayer byId [id]

  • player: selects game player using an entity selector
  • id: selects game player using a game player ID
  • If the game player does not exist, the return value is -2.
  • return value: whether the addition was successful

DeathMatch game management

IDeathMatchGameManagement

Respawn game player

/battleroyale api gameProcessManager deathMatch respawnGamePlayer byPlayer [player]

/battleroyale api gameProcessManager deathMatch respawnGamePlayer byId [id]

  • player: selects game player using an entity selector
  • id: selects game player using a game player ID
  • If the game player does not exist, the return value is -2.
  • return value: whether the respawn was successful

🌐 Language / 语言


Clone this wiki locally