fix: nukkit unregister event error

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2020-02-25 18:25:16 +08:00
parent a872172fff
commit eba21c08dc

View File

@ -42,6 +42,6 @@ export class NukkitEvent extends event.Event {
return listener; return listener;
} }
unregister(event: any, listener: any): void { unregister(event: any, listener: any): void {
event.getHandlers().unregister(listener); event.getMethod('getHandlers').invoke(null).unregister(listener);
} }
} }