diff --git a/core-parent/core/src/main/java/love/forte/simbot/core/listener/CoreListenerManager.kt b/core-parent/core/src/main/java/love/forte/simbot/core/listener/CoreListenerManager.kt index 1dde7f274..ddd51ffee 100644 --- a/core-parent/core/src/main/java/love/forte/simbot/core/listener/CoreListenerManager.kt +++ b/core-parent/core/src/main/java/love/forte/simbot/core/listener/CoreListenerManager.kt @@ -147,14 +147,14 @@ public class CoreListenerManager( oldValue.apply { addAll(value) } } - ConcurrentHashMap().clear() - // clear cache map. - // 寻找并更新缓存监听 - // no. 直接清除缓存。 - cacheListenerFunctionMap.clear() + // 清除缓存 + if (cacheListenerFunctionMap.isNotEmpty()) { + cacheListenerFunctionMap.clear() + logger.debug("Listener cache cleaned.") + } + - logger.debug("Listener cache cleaned.") } } diff --git a/pom.xml b/pom.xml index d800386f8..45236c0e2 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ - 1.4.20 + 1.4.0-rc 2.3.5.RELEASE @@ -631,6 +631,7 @@ org.jetbrains.dokka dokka-maven-plugin + ${dokka.version}