-
Notifications
You must be signed in to change notification settings - Fork 2
TeamManager API command
ITeamManager
/battleroyale api teamManager [...]
/battleroyale api teamManager shouldAutoJoin
-
返回值:是否自动加入游戏
/battleroyale api teamManager findNotFullTeamId
-
返回值:第一个未满员队伍ID,如无则返回 -1
/battleroyale api teamManager hasEnoughPlayerTeamToStart
-
返回值:当前游戏玩家和队伍是否足够开始游戏
IGameTeamReadApi
/battleroyale api teamManager getPlayerLimit
-
返回值:游戏玩家总数上限
/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
-
返回值:当前游戏是否只剩人机玩家
/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
/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
/battleroyale api teamManager sendPlayerTeamId [player]
- player:用实体选择器选中并获取游戏玩家
- 若不存在对应的游戏玩家,则不发送消息
-
返回值:是否存在对应的游戏玩家
IVanillaTeam
/battleroyale api teamManager clearVanillaTeam
在游戏维度为全体游戏玩家退出原版队伍
-
返回值:1
ITeamManager
/battleroyale api teamManager [...]
/battleroyale api teamManager shouldAutoJoin
-
return value: whether to automatically join the game
/battleroyale api teamManager findNotFullTeamId
-
return value: the first not full team ID, returns -1 if none exists
/battleroyale api teamManager hasEnoughPlayerTeamToStart
-
return value: whether the current game players and teams are sufficient to start the game
IGameTeamReadApi
/battleroyale api teamManager getPlayerLimit
-
return value: maximum total number of game players
/battleroyale api teamManager getGamePlayerId [player]
- player: selects game player using an entity selector
- If the game player does not exist, the
return valueis 0. -
return value: the game player ID
/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 valueis 0. -
return value: 1
/battleroyale api teamManager hasStandingGamePlayer [player]
- player: selects game player using an entity selector
- If the game player does not exist, the
return valueis 0. -
return value: whether the game player is not eliminated in the current game
/battleroyale api teamManager onlyRemainBotTeam
-
return value: whether only bot players remain in the current game
/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 valueis 0. -
return value: the game team ID the game player belongs to
/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 valueis 0. -
return value: 1
/battleroyale api teamManager getGamePlayersTotal
-
return value: the current total number of 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
/battleroyale api teamManager getGameTeamsTotal
-
return value: the current total number of 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
/battleroyale api teamManager getStandingGamePlayersTotal
-
return value: the current total number of non-eliminated 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
/battleroyale api teamManager getStandingGameTeamsTotal
-
return value: the current total number of non-eliminated 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
/battleroyale api teamManager getRandomStandingGamePlayerId
- If the game player does not exist, the
return valueis 0. -
return value: any non-eliminated game player ID
/battleroyale api teamManager getNonBotTeamCount
-
return value: the total number of non-bot teams
/battleroyale api teamManager getStandingPlayerTeamCount
-
return value: the total number of non-eliminated non-bot teams
ITeamManagement
/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 valueis 0. -
return value: whether the elimination was successful
/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 valueis 0. -
return value: whether the elimination was successful
ITeamPreManagement
/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 valueis 0. - id: specific the team ID to join
-
return value: whether the player is a game player
/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 valueis 0. -
return value: whether the removal was successful
ITeamNotification
/battleroyale api teamManager sendPlayerTeamId [player]
- player: selects game player using an entity selector
- If the game player does not exist, the
return valueis 0. -
return value: whether the game player exists
IVanillaTeam
/battleroyale api teamManager clearVanillaTeam
Makes all game players leave their vanilla teams within the game dimension:
-
return value: 1
🌐 Language / 语言
-
- Configuration Introduction
- Command Introcuction
- Game type introduction
- About
- Mod development tutorial