Skip to content

Commit 26a2e75

Browse files
committed
docs: update docs
1 parent 5626226 commit 26a2e75

File tree

12 files changed

+20
-17
lines changed

12 files changed

+20
-17
lines changed

docs/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
],
55
"exclude": [
66
"node_modules/**/*",
7-
"../types/api/_/**"
7+
"../types/api/_/**",
8+
"../types/tsconfig.json"
89
],
910
"compilerOptions": {
1011
"experimentalDecorators": true, // 启用装饰器

docs/typedoc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"../types/api/_/**",
1212
"node_modules/**/*",
1313
],
14+
"name": "API Reference",
1415
"out": "./reference", // 输出目录
1516
"readme": "none", // 不生成README.md
1617
"useCodeBlocks": true, // 使用代码块

types/api/Server.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ declare class Server {
110110
/**
111111
* 根据给定的通用唯一识别码(UUID)获取玩家信息。
112112
*
113-
* @param id 要检索的玩家的通用唯一识别码(UUID)
113+
* @param uuid 要检索的玩家的通用唯一识别码(UUID)
114114
* @return 如果找到,则返回一个玩家对象;否则返回 null
115115
*/
116116
getPlayer(uuid: UUID): Player;

types/api/actor/Actor.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ declare class Actor extends CommandSender {
185185
*
186186
* @param invisible 是否设置名称标签为不可见。
187187
*/
188-
setNameTagAlwaysVisible(visible: string): boolean;
188+
setNameTagAlwaysVisible(invisible: string): boolean;
189189

190190
/**
191191
* 获取角色的当前名称标签。

types/api/command/CommandSender.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ declare class CommandSender extends Permissible {
3636
*
3737
* @param message 要显示的消息
3838
*/
39-
sendMessage(...args: any[]): void;
39+
sendMessage(...message: any[]): void;
4040

4141
/**
4242
* @brief 将这个发送者的错误消息发送出去
4343
*
4444
* @param message 错误消息要显示
4545
*/
46-
sendErrorMessage(...args: any[]): void;
46+
sendErrorMessage(...message: any[]): void;
4747

4848
/**
4949
* @brief 返回运行该命令的服务器实例

types/api/form/Form.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ declare class Form {
2727
* @param on_close 回调函数要设置为。
2828
* @return 当前表单的引用。
2929
*/
30-
setOnClose(callback: (player: Player | undefined) => void): this;
30+
setOnClose(on_close: (player: Player | undefined) => void): this;
3131

3232
/**
3333
* @brief 获取表单关闭时的回调函数。

types/api/form/MessageForm.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ declare class MessageForm extends Form {
2121
* @param text 要设置为表单内容的文字。
2222
* @return 当前表单的引用。
2323
*/
24-
setContent(msg: Message): this;
24+
setContent(text: Message): this;
2525

2626
/**
2727
* @brief 获取按钮1的文字。
@@ -36,7 +36,7 @@ declare class MessageForm extends Form {
3636
* @param text 要设置为按钮1文字的文字。
3737
* @return 当前表单的引用。
3838
*/
39-
setButton1(msg: Message): this;
39+
setButton1(text: Message): this;
4040

4141
/**
4242
* @brief 获取按钮2的文字。
@@ -51,15 +51,15 @@ declare class MessageForm extends Form {
5151
* @param text 要设置为按钮2文字的文字。
5252
* @return 当前表单的引用。
5353
*/
54-
setButton2(msg: Message): this;
54+
setButton2(text: Message): this;
5555

5656
/**
5757
* @brief 设置表单提交时的回调函数。
5858
*
5959
* @param on_submit 回调函数要设置为。
6060
* @return 当前表单的引用。
6161
*/
62-
setOnSubmit(fn: (player: Player, index: number) => void): this;
62+
setOnSubmit(on_submit: (player: Player, index: number) => void): this;
6363

6464
/**
6565
* @brief 获取表单提交时的回调函数。

types/api/level/Location.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ declare class Location extends Position {
5454
*
5555
* @param yaw 新旋转的yaw
5656
*/
57-
setYaw(): number;
57+
setYaw(yaw: number): void;
5858
}

types/api/level/Position.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ declare class Position extends Vector {
2020
*
2121
* @param dimension 新的维度对象,该位置将位于其中
2222
*/
23-
setDimension(dim: Dimension): void;
23+
setDimension(dimension: Dimension): void;
2424

2525
/**
2626
* 获取X组件的下确界值。这表示这个位置所包含的块ID为多少。

types/api/permissions/PermissionAttachment.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ declare class PermissionAttachment {
2121
/**
2222
* 设置一个在附件被移除时要调用的执行器。可以为空。
2323
*
24-
* @param ex 在移除此附件时要调用的执行器
24+
* @param callback 在移除此附件时要调用的执行器
2525
*/
2626
setRemovalCallback(callback: PermissionRemovedExecutor): void;
2727

0 commit comments

Comments
 (0)