public void register(IEventListener listener, EventBus bus, Class<? extends Event> clazz) {
try {
clazz.newInstance().getListenerList().register(getBusID(bus), EventPriority.NORMAL, listener);
} catch (Exception e) {
}
}
java类cpw.mods.fml.common.eventhandler.IEventListener的实例源码
Dispatcher.java 文件源码
项目:bit-client
阅读 32
收藏 0
点赞 0
评论 0
Dispatcher.java 文件源码
项目:bit-client
阅读 28
收藏 0
点赞 0
评论 0
public void unregister(IEventListener listener, EventBus bus, Class<? extends Event> clazz) {
try {
clazz.newInstance().getListenerList().unregister(getBusID(bus), listener);
} catch (Exception e) {
}
}
EventStatsPrinter.java 文件源码
项目:EventDebug
阅读 16
收藏 0
点赞 0
评论 0
@Override
public void visitUnknownListener(IEventListener listener) {
writer.format("\t\tUnknown listener: %s (%s)\n", listener, listener.getClass());
}