Files
node_server/bot/function/entity/open_cursor_entity_container.ts
T
2026-10-22 17:07:08 +08:00

13 lines
674 B
TypeScript

import type {Bot} from '@wp2508/mineflayer';
import type {BaseFunction} from '../../../types/bot/function/function.ts';
import {entity_arguments, run_entity_operation, type CursorArgs} from './shared.ts';
export class init implements BaseFunction<CursorArgs> {
readonly name = 'open_cursor_entity_container';
readonly i18n = {lang: 'zh-CN', name: '打开光标实体容器', description: '激活光标实体并等待新容器窗口,已有窗口时失败,最多等待五秒'};
readonly args = entity_arguments(false, false);
async run(bot: Bot, args: CursorArgs): Promise<boolean> {
return run_entity_operation(bot, args, false, 'open');
}
}