refactor: remove repeated hook feature in YukiMemberHookCreator

This commit is contained in:
2025-06-16 18:20:47 +08:00
parent d36a6a10e0
commit beb7b431f8
8 changed files with 32 additions and 83 deletions

View File

@@ -77,4 +77,12 @@ val instance: Any
name = "test"
emptyParameters()
}.of(instance).invokeOriginal()
```
```
## Repeat Hook Restricted Deprecated
`YukiHookAPI` has deprecated the restriction of duplicate Hook since the `1.3.0` version.
Now, `YukiHookAPI` no longer limits duplicate Hooks to the same method, you can hook multiple times on the same method.
`YukiHookAPI` also deprecated the `onAlreadyHooked` method of `hook { ... }`.
Now this method will be useless and will not be called back. If necessary, please manually handle the relevant logic of duplicate Hooks.

View File

@@ -73,4 +73,10 @@ val instance: Any
name = "test"
emptyParameters()
}.of(instance).invokeOriginal()
```
```
## 重复 Hook 限制弃用
`YukiHookAPI``1.3.0` 版本开始弃用了重复 Hook 的限制,现在,`YukiHookAPI` 不再限制重复 Hook 同一个方法,你可以在同一个方法上多次 Hook。
`YukiHookAPI` 同时弃用了 `hook { ... }``onAlreadyHooked` 方法,现在此方法将无作用且不会被回调,如有需要,请手动处理重复 Hook 的相关逻辑。