From b477938e4f2673dfd70b8d8d0bc9d3ee6513ad3c Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Fri, 14 Feb 2020 04:02:37 +0800 Subject: [PATCH] fix: bungee unregister error Signed-off-by: MiaoWoo --- packages/bungee/src/event.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/bungee/src/event.ts b/packages/bungee/src/event.ts index fd9defb1..c6df5cfe 100644 --- a/packages/bungee/src/event.ts +++ b/packages/bungee/src/event.ts @@ -96,8 +96,7 @@ export class BungeeEvent extends event.Event { let prioritiesMap = this.byListenerAndPriority.get(eventCls); if (prioritiesMap != null) { let bindings = reflect.on(listener).get("bindings").get(); - // Can't read hash map so need serialize and deserialize - let priority = JSON.parse(JSON.stringify(bindings))["priority"]; + let priority = bindings["priority"]; // Map<监听器, 方法[]> let currentPriorityMap = prioritiesMap.get(priority); if (currentPriorityMap != null) {