---
sidebarDepth: 1
---
# 记分板
## GetAllPlayerScoreboardObjects
服务端客户端
### 服务端接口
method in mod.server.component.gameCompServer.GameComponentServer
- 描述
获取玩家记分项
- 参数
无
- 返回值
|
数据类型
| 说明 |
| :--- | :--- |
| list(dict) | 玩家记分项信息字典列表 |
- 示例
```python
import mod.server.extraServerApi as serverApi
comp = serverApi.GetEngineCompFactory().CreateGame(levelId)
print(comp.GetAllPlayerScoreboardObjects())
```
### 客户端接口
method in mod.client.component.gameCompClient.GameComponentClient
- 描述
获取玩家记分项
- 参数
无
- 返回值
| 数据类型
| 说明 |
| :--- | :--- |
| list(dict) | 玩家记分项信息字典列表 |
- 备注
- 注意,只有使用命令 /scoreboard objectives setdisplay sidebar xxx 设置显示后的记分项才能在客户端侧获取到
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateGame(levelId)
print(comp.GetAllPlayerScoreboardObjects())
```
## GetAllScoreboardObjects
服务端客户端
### 服务端接口
method in mod.server.component.gameCompServer.GameComponentServer
- 描述
获取所有记分板项
- 参数
无
- 返回值
| 数据类型
| 说明 |
| :--- | :--- |
| list(dict) | 记分准则信息字典列表 |
- 示例
```python
import mod.server.extraServerApi as serverApi
comp = serverApi.GetEngineCompFactory().CreateGame(levelId)
print(comp.GetAllScoreboardObjects())
```
### 客户端接口
method in mod.client.component.gameCompClient.GameComponentClient
- 描述
获取所有记分板项
- 参数
无
- 返回值
| 数据类型
| 说明 |
| :--- | :--- |
| list(dict) | 记分准则信息字典列表 |
- 备注
- 注意,只有使用命令 /scoreboard objectives setdisplay sidebar xxx 设置显示后的记分项才能在客户端侧获取到
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateGame(levelId)
print(comp.GetAllScoreboardObjects())
```