From a2bce715f3328b5155f9d6715c2b3899884ace58 Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Tue, 25 Feb 2020 18:25:16 +0800 Subject: [PATCH] fix: nukkit unregister event error Signed-off-by: MiaoWoo --- packages/nukkit/src/event.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nukkit/src/event.ts b/packages/nukkit/src/event.ts index ebb54ae0..5da47eef 100644 --- a/packages/nukkit/src/event.ts +++ b/packages/nukkit/src/event.ts @@ -42,6 +42,6 @@ export class NukkitEvent extends event.Event { return listener; } unregister(event: any, listener: any): void { - event.getHandlers().unregister(listener); + event.getMethod('getHandlers').invoke(null).unregister(listener); } }