Skip to content

Commit ee54b25

Browse files
committed
docs: add brief comments to enum types
1 parent b5f432e commit ee54b25

File tree

3 files changed

+31
-12
lines changed

3 files changed

+31
-12
lines changed

types/enum/DimensionType.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/// <reference path="../index.d.ts"/>
22

33
declare namespace Enums {
4+
/**
5+
* @brief 表示各种维度类型的接口。
6+
*/
47
enum DimensionType {
58
Overworld = 0,
69
Nether = 1,

types/enum/GameMode.d.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
/// <reference path="../index.d.ts"/>
22

33
declare namespace Enums {
4-
/** 游戏模式 */
4+
/**
5+
* 表示游戏类型的接口。
6+
*/
57
enum GameMode {
6-
/** 生存模式 */
8+
/**
9+
* 生存模式是“正常”游戏类型,没有特殊功能。
10+
*/
711
Survival = 0,
8-
/** 创造模式 */
12+
/**
13+
* 创造模式可以飞行、不可攻击,可以随意获取物品。
14+
*/
915
Creative = 1,
10-
/** 冒险模式 */
16+
/**
17+
* 冒险模式无法使用正确的工具损坏方块。
18+
*/
1119
Adventure = 2,
12-
/** 旁观者模式 */
13-
Spectator = 3
20+
/**
21+
* 观察者模式无法在任何方式与世界互动,并且对普通玩家是不可见的。这授予玩家通过世界无碰撞的能力。
22+
*/
23+
Spectator = 3,
1424
}
15-
}
25+
}

types/enum/PluginLoadOrder.d.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
/// <reference path="../index.d.ts"/>
22

33
declare namespace Enums {
4-
/** 插件加载顺序 */
4+
/**
5+
* @brief 表示插件应按初始化和启用的顺序排列。
6+
*/
57
enum PluginLoadOrder {
6-
/** 在启动时加载 */
8+
/**
9+
* 指示插件将在启动时加载
10+
*/
711
Startup = 0,
8-
/** 在世界加载后加载 */
9-
PostWorld = 1
12+
/**
13+
* 表示该插件将与第一个/默认世界创建后加载
14+
*/
15+
PostWorld = 1,
1016
}
11-
}
17+
}

0 commit comments

Comments
 (0)