-
Notifications
You must be signed in to change notification settings - Fork 2
GameProcessManager API command
IGameProcessManager
/battleroyale api gameProcessManager [...]
/battleroyale api gameProcessManager checkIfGameShouldEndAndFinish
- 若不在游戏中,
返回值为 0 - 检查并更新无效游戏玩家
- 更新游戏停止状态
-
返回值:执行后是否不在游戏中(该指令是否成功结束游戏)
/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 [...]
- 若未注册死斗模式游戏进程管理器,
返回值为 -1
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 -
返回值:是否成功再出生
IGameProcessManager
/battleroyale api IGameProcessManager [...]
/battleroyale api gameProcessManager checkIfGameShouldEndAndFinish
- If the game is not in progress, the
return valueis 0. - Check and update invalid game player
- Finish game if should end
-
return value: whether the game is not in progress after execution (whether this command successfully ended the game)
/battleroyale api gameProcessManager finishGameIfShouldEnd
- If the game is not in progress, the
return valueis 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)
IGameManagement
/battleroyale api gameProcessManager checkAndUpdateInvalidGamePlayer
Immediately updates the last recorded status of game players and eliminates invalid players:
-
return value: 1
/battleroyale api gameProcessManager teleportToLobbyInGame [player]
- player: entity selector
- If the entity selector is not a living entity, the
return valueis 0. - Teleports the player to the lobby, eliminate the game player if the game is in progress.
-
return value: 1
/battleroyale api gameProcessManager teleportAfterGame [teleportWinner] [teleportNonWinner]
- If the game dimension cannot be retrieved, the
return valueis 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
/battleroyale api gameProcessManager spectateGame [player]
- player: entity selector
- If the entity selector is not a player, the
return valueis 0. -
return value: whether spectating was successfully enabled
/battleroyale api gameProcessManager healGamePlayers
- If the game dimension cannot be retrieved, the
return valueis 0. -
return value: 1
/battleroyale api gameProcessManager finishGameAddWinner [hasWinner]
- If the game is not in progress, the
return valueis 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)
IGameNotification
/battleroyale api gameProcessManager sendWinnerResult
- If the game dimension cannot be retrieved, the
return valueis 0. -
return value: 1
/battleroyale api gameProcessManager notifyWinner [player] [id]
- player: selects game player using an entity selector
- If the corresponding game player does not exist, the
return valueis 0. - id: Particle config id
-
return value: 1
/battleroyale api gameProcessManager sendGameSpectateMessage [player] [allowSpectate]
- player: entity selector
- If the entity selector is not a player, the
return valueis 0. - allowSpectate: whether spectating is allowed
-
return value: 1
/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 valueis 0. - Sends the "downed" message for the specified game player.
-
return value: 1
/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 valueis 0. - Sends the "revived" message for the specified game player.
-
return value: 1
/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 valueis 0. - Sends the "eliminated" message for the specified game player.
-
return value: 1
IDeathMatchProcessManager
/battleroyale api gameProcessManager deathMatch [...]
- If not Register DeathMatch GameProcessManager, the
return valueis -1.
IDeathMatchInfoGetter
/battleroyale api gameProcessManager deathMatch getCurrentMaxKill
-
return value: the current maximum number of kills among game players or teams
IDeathMatchDataManagement
/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 valueis -2. -
return value: whether the record was successfully added
/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 valueis -2. -
return value: whether the record was successfully added
/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 valueis -2. -
return value: whether the addition was successful
IDeathMatchGameManagement
/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 valueis -2. -
return value: whether the respawn was successful
🌐 Language / 语言
-
- Configuration Introduction
- Command Introcuction
- Game type introduction
- About
- Mod development tutorial