yoni-mcscripts-lib
Version:
为 Minecraft Script API 中的部分接口创建了 wrapper,并提供简单的事件管理器和任务管理器,另附有一些便于代码编写的一些小工具。
10 lines (9 loc) • 409 B
text/typescript
import { EventRegistry } from "./EventRegistry.js";
export class EventError<T extends EventRegistry<TEvent>, TEvent extends Function = T["eventClass"], E extends {} = TEvent["prototype"]> extends Error {
constructor(registry: T, event: E, error: any){
super("处理事件时遇到了错误:" + error.message);
this.name = "EventError";
this.cause = error;
}
cause: any
}