- 最后登录:
- -
- 阅读权限:
- 25
- 主题数:
- 4
- 总积分:
- 1404
- 回帖数:
- 24
- 精华数:
- 0
- MCID:
- CuiJiangQiu
-
EU:5
RF:1320
Vis:4
Mana:0
AE:63
|
你的意思是取消handleArrowLooseEvent(ArrowLooseEvent event)的执行?一般情况下我选择修改源码,一个return就解决了,但不修改的除了mixin外或许可以尝试自己编写个AOP试一下- import org.aopalliance.intercept.MethodInterceptor;
- import org.aopalliance.intercept.MethodInvocation;
- public class MyMethodInterceptor implements MethodInterceptor {
- @Override
- public Object invoke(MethodInvocation invocation) throws Throwable {
- String methodName = invocation.getMethod().getName();
- if ("handleArrowLooseEvent".equals(methodName)) {
- // 返回null,取消原方法的执行
- return null;
- }
-
- return invocation.proceed();
- }
- }
复制代码 |
|