方法签名 MeetAddonClient.on
提供对
AddonCallbacks
可供该插件使用的数据
签名
on<T extends keyof AddonCallbacks>(
eventId: T,
eventHandler: AddonCallbacks[T],
): void;
类型参数
详细信息
参数
返回
void
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-15。
[null,null,["最后更新时间 (UTC):2024-10-15。"],[[["Gives add-ons access to `AddonCallbacks` for utilizing various functionalities."],["Employs the `on` method, accepting an event ID and handler to manage add-on events."],["Utilizes generics for type safety and flexibility in handling different event types."],["Offers a parameter named `eventId` of a generic type `T` and an `eventHandler` with a type based on the provided `eventId`."],["Returns void, indicating it primarily focuses on event registration and execution rather than returning a specific value."]]],[]]