Skip to content

TeamManager API command

XiaoColorful edited this page Mar 22, 2026 · 3 revisions

English

队伍管理器

ITeamManager

/battleroyale api teamManager [...]

是否自动加入

/battleroyale api teamManager shouldAutoJoin

获取未满员队伍ID

/battleroyale api teamManager findNotFullTeamId

  • 返回值:第一个未满员队伍ID,如无则返回 -1
是否有足够玩家队伍开始游戏

/battleroyale api teamManager hasEnoughPlayerTeamToStart

  • 返回值:当前游戏玩家和队伍是否足够开始游戏

游戏队伍读取

IGameTeamReadApi

获取玩家上限

/battleroyale api teamManager getPlayerLimit

获取游戏玩家ID

/battleroyale api teamManager getGamePlayerId [player]

  • player:用实体选择器选中并获取游戏玩家
  • 若不存在对应的游戏玩家,返回值为 0
  • 返回值:游戏玩家ID
获取游戏玩家

/battleroyale api teamManager getGamePlayer [resourceLocation] [storagePath] [detailLevel] byPlayer [player]

/battleroyale api teamManager getGamePlayer [resourceLocation] [storagePath] [detailLevel] byId [id]

将游戏玩家信息存入指定命令存储

  • resourceLocation:标识符
  • storagePath:NBT路径
  • detailLevel:详细程度,范围[0, 3]
  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏玩家ID选中游戏玩家
  • 若不存在对应的游戏玩家,返回值为 0
  • 返回值:1
是否为未被淘汰的游戏玩家

/battleroyale api teamManager hasStandingGamePlayer [player]

  • player:用实体选择器选中并获取游戏玩家
  • 若不存在对应的游戏玩家,返回值为 0
  • 返回值:游戏玩家在当前游戏是否未被淘汰
是否只剩人机队伍

/battleroyale api teamManager onlyRemainBotTeam

  • 返回值:当前游戏是否只剩人机玩家
获取游戏队伍ID

/battleroyale api teamManager getGameTeamId byPlayer [player]

/battleroyale api teamManager getGameTeamId byId [id]

  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏玩家ID选中游戏玩家
  • 若不存在对应的游戏玩家,返回值为 0
  • 返回值:游戏玩家所在的游戏队伍ID
获取游戏队伍

/battleroyale api teamManager getGameTeam [resourceLocation] [storagePath] [detailLevel] byPlayer [player]

/battleroyale api teamManager getGameTeam [resourceLocation] [storagePath] [detailLevel] byId [id]

将游戏队伍信息存入指定命令存储

  • resourceLocation:标识符
  • storagePath:NBT路径
  • detailLevel:详细程度,范围[0, 3]
  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏队伍ID选中游戏队伍
  • 若不存在对应的游戏玩家或游戏队伍,返回值为0
  • 返回值:1
获取游戏玩家总数

/battleroyale api teamManager getGamePlayersTotal

  • 返回值:当前游戏玩家总数
获取全部游戏玩家

/battleroyale api teamManager getGamePlayers [resourceLocation] [storagePath] [detailLevel]

将所有游戏玩家信息存入指定命令存储

  • resourceLocation:标识符
  • storagePath:NBT路径
  • detailLevel:详细程度,范围[0, 3]
  • 返回值:1
获取游戏队伍总数

/battleroyale api teamManager getGameTeamsTotal

  • 返回值:当前游戏队伍总数
获取全部游戏队伍

/battleroyale api teamManager getGameTeams [resourceLocation] [storagePath] [detailLevel]

将所有游戏队伍信息存入指定命令存储

  • resourceLocation:标识符
  • storagePath:NBT路径
  • detailLevel:详细程度,范围[0, 3]
  • 返回值:1
获取全部未被淘汰的游戏玩家数量

/battleroyale api teamManager getStandingGamePlayersTotal

  • 返回值:当前未被淘汰的游戏玩家数量
获取全部未被淘汰的游戏玩家

/battleroyale api teamManager getStandingGamePlayers [resourceLocation] [storagePath] [detailLevel]

将所有未被淘汰的游戏玩家信息存入指定命令存储

  • resourceLocation:标识符
  • storagePath:NBT路径
  • detailLevel:详细程度,范围[0, 3]
  • 返回值:1
获取全部未被淘汰的游戏队伍数量

/battleroyale api teamManager getStandingGameTeamsTotal

  • 返回值:当前未被淘汰的游戏队伍数量
获取全部未被淘汰的游戏队伍

/battleroyale api teamManager getStandingGameTeams [resourceLocation] [storagePath] [detailLevel]

将所有未被淘汰的游戏队伍信息存入指定命令存储

  • resourceLocation:标识符
  • storagePath:NBT路径
  • detailLevel:详细程度,范围[0, 3]
  • 返回值:1
获取随机未被淘汰的游戏玩家ID

/battleroyale api teamManager getRandomStandingGamePlayerId

  • 若不存在对应的游戏玩家,返回值为 0
  • 返回值:任一游戏玩家ID
获取非人机队伍总数

/battleroyale api teamManager getNonBotTeamCount

  • 返回值:非人机队伍总数
获取未被淘汰的非人机游戏队伍数量

/battleroyale api teamManager getStandingPlayerTeamCount

  • 返回值:未被淘汰的非人机队伍数量

队伍管理

ITeamManagement

静默强制淘汰游戏玩家

/battleroyale api teamManager forceEliminatePlayerSilence byPlayer [player]

/battleroyale api teamManager forceEliminatePlayerSilence byId [id]

在游戏中强制淘汰玩家,不包含发送系统消息;成功淘汰后发送大厅传送消息:

  • player:用实体选择器选中并获取游戏玩家
  • id:用游戏玩家ID选中游戏玩家
  • 若不存在对应的游戏玩家,返回值为 0
  • 返回值:是否成功淘汰
强制从游戏队伍淘汰游戏玩家

/battleroyale api teamManager forceEliminatePlayerFromTeam [player]

在游戏中强制淘汰玩家并向队友发送消息:

  • player:用实体选择器选中并获取游戏玩家
  • 若不存在对应的游戏玩家,返回值为 0
  • 返回值:是否成功淘汰

队伍预管理

ITeamPreManagement

强制加入队伍

/battleroyale api teamManager forceJoinTeam [player]

/battleroyale api teamManager forceJoinTeam [player] [id]

游戏未开始时强制玩家加入队伍,优先加入已有队伍,其次创建新队伍:

  • player:实体选择器
  • 若实体选择器不为生物,返回值为 0
  • id:指定加入的队伍ID
  • 返回值:玩家是否为游戏玩家
强制将玩家移出队伍

/battleroyale api teamManager removePlayerFromTeam byPlayer [player]

/battleroyale api teamManager removePlayerFromTeam byId [id]

游戏未开始时将玩家移出队伍:

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

队伍通知

ITeamNotification

发送玩家队伍ID

/battleroyale api teamManager sendPlayerTeamId [player]

  • player:用实体选择器选中并获取游戏玩家
  • 若不存在对应的游戏玩家,则不发送消息
  • 返回值:是否存在对应的游戏玩家

原版队伍

IVanillaTeam

退出原版队伍

/battleroyale api teamManager clearVanillaTeam

在游戏维度为全体游戏玩家退出原版队伍

  • 返回值:1

English

Team manager

ITeamManager

/battleroyale api teamManager [...]

Should auto join

/battleroyale api teamManager shouldAutoJoin

Find not full team ID

/battleroyale api teamManager findNotFullTeamId

  • return value: the first not full team ID, returns -1 if none exists
Has enough player team to start

/battleroyale api teamManager hasEnoughPlayerTeamToStart

  • return value: whether the current game players and teams are sufficient to start the game

Game team read api

IGameTeamReadApi

Get player limit

/battleroyale api teamManager getPlayerLimit

Get game player ID

/battleroyale api teamManager getGamePlayerId [player]

  • player: selects game player using an entity selector
  • If the game player does not exist, the return value is 0.
  • return value: the game player ID
Get game player

/battleroyale api teamManager getGamePlayer [resourceLocation] [storagePath] [detailLevel] byPlayer [player]

/battleroyale api teamManager getGamePlayer [resourceLocation] [storagePath] [detailLevel] byId [id]

Saves the game player's information to the specified command storage:

  • resourceLocation: identifier
  • storagePath: NBT path
  • detailLevel: detailed level, range [0, 3]
  • 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 0.
  • return value: 1
Has standing game player

/battleroyale api teamManager hasStandingGamePlayer [player]

  • player: selects game player using an entity selector
  • If the game player does not exist, the return value is 0.
  • return value: whether the game player is not eliminated in the current game
Only remain bot team

/battleroyale api teamManager onlyRemainBotTeam

  • return value: whether only bot players remain in the current game
Get game team ID

/battleroyale api teamManager getGameTeamId byPlayer [player]

/battleroyale api teamManager getGameTeamId 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 0.
  • return value: the game team ID the game player belongs to
Get game team

/battleroyale api teamManager getGameTeam [resourceLocation] [storagePath] [detailLevel] byPlayer [player]

/battleroyale api teamManager getGameTeam [resourceLocation] [storagePath] [detailLevel] byId [id]

Saves the game team's information to the specified command storage:

  • resourceLocation: identifier
  • storagePath: NBT path
  • detailLevel: detailed level, range [0, 3]
  • 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 0.
  • return value: 1
Get game players total

/battleroyale api teamManager getGamePlayersTotal

  • return value: the current total number of game players
Get all game players

/battleroyale api teamManager getGamePlayers [resourceLocation] [storagePath] [detailLevel]

Saves all the game players' information to the specified command storage:

  • resourceLocation: identifier
  • storagePath: NBT path
  • detailLevel: detailed level, range [0, 3]
  • return value: 1
Get game teams total

/battleroyale api teamManager getGameTeamsTotal

  • return value: the current total number of game teams
Get all game teams

/battleroyale api teamManager getGameTeams [resourceLocation] [storagePath] [detailLevel]

Saves all the game teams' information to the specified command storage:

  • resourceLocation: identifier
  • storagePath: NBT path
  • detailLevel: detailed level, range [0, 3]
  • return value: 1
Get standing game players total

/battleroyale api teamManager getStandingGamePlayersTotal

  • return value: the current total number of non-eliminated game players
Get all standing game players

/battleroyale api teamManager getStandingGamePlayers [resourceLocation] [storagePath] [detailLevel]

Saves all the non-eliminated game players' information to the specified command storage:

  • resourceLocation: identifier
  • storagePath: NBT path
  • detailLevel: detailed level, range [0, 3]
  • return value: 1
Get standing game teams total

/battleroyale api teamManager getStandingGameTeamsTotal

  • return value: the current total number of non-eliminated game teams
Get all standing game teams

/battleroyale api teamManager getStandingGameTeams [resourceLocation] [storagePath] [detailLevel]

Saves all the non-eliminated game teams' information to the specified command storage:

  • resourceLocation: identifier
  • storagePath: NBT path
  • detailLevel: detailed level, range [0, 3]
  • return value: 1
Get random standing game player ID

/battleroyale api teamManager getRandomStandingGamePlayerId

  • If the game player does not exist, the return value is 0.
  • return value: any non-eliminated game player ID
Get non-bot team count

/battleroyale api teamManager getNonBotTeamCount

  • return value: the total number of non-bot teams
Get standing player team count

/battleroyale api teamManager getStandingPlayerTeamCount

  • return value: the total number of non-eliminated non-bot teams

Team management

ITeamManagement

Force eliminate player silence

/battleroyale api teamManager forceEliminatePlayerSilence byPlayer [player]

/battleroyale api teamManager forceEliminatePlayerSilence byId [id]

Forcefully eliminates the player during the game without sending messages; sends a lobby teleport message upon successful elimination:

  • 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 0.
  • return value: whether the elimination was successful
Force eliminate player from team

/battleroyale api teamManager forceEliminatePlayerFromTeam [player]

Forcefully eliminates the player during the game and sends a message to teammates:

  • player: selects game player using an entity selector
  • If the game player does not exist, the return value is 0.
  • return value: whether the elimination was successful

Team pre management

ITeamPreManagement

Force join team

/battleroyale api teamManager forceJoinTeam [player]

/battleroyale api teamManager forceJoinTeam [player] [id]

Forcefully joins the player to a team before the game starts, prioritizing existing teams or creating a new one:

  • player: entity selector
  • If the entity selector is not a living entity, the return value is 0.
  • id: specific the team ID to join
  • return value: whether the player is a game player
Remove player from team

/battleroyale api teamManager removePlayerFromTeam byPlayer [player]

/battleroyale api teamManager removePlayerFromTeam byId [id]

Removes the player from their team before the game starts:

  • 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 0.
  • return value: whether the removal was successful

Team notification

ITeamNotification

Send player team ID

/battleroyale api teamManager sendPlayerTeamId [player]

  • player: selects game player using an entity selector
  • If the game player does not exist, the return value is 0.
  • return value: whether the game player exists

Vanilla team

IVanillaTeam

Clear vanilla team

/battleroyale api teamManager clearVanillaTeam

Makes all game players leave their vanilla teams within the game dimension:

  • return value: 1

🌐 Language / 语言


Clone this wiki locally