新增2接口2事件

- 新增getMaxPlayers和dropPlayerItem接口
- 新增handleRequestTryAction和handleRequestAction事件
This commit is contained in:
子沐呀
2024-06-26 20:28:16 +08:00
Unverified
parent ea9934f315
commit 5afb0f8433
8 changed files with 201 additions and 5 deletions
+34
View File
@@ -191,4 +191,38 @@ declare class Event2 {
entity: Entity
) => void
): boolean;
/** 尝试物品物品请求 */
static listen(
/** 事件名 */
event: "handleRequestTryAction",
/** 回调函数 */
listener: (
/** 请求的玩家对象 */
Player: Player,
/** 请求的操作 */
actionType: number,
/** 请求的槽位 */
slot: number,
/** 容器的ID */
containerNetId: number
) => boolean | void
): boolean;
/** 处理物品请求后(不可拦截) */
static listen(
/** 事件名 */
event: "handleRequestAction",
/** 回调函数 */
listener: (
/** 请求的玩家对象 */
Player: Player,
/** 请求的操作 */
actionType: number,
/** 请求的槽位 */
slot: number,
/** 容器的ID */
containerNetId: number
) => void
): boolean;
}