“Chemdah 开发者文档:自定义组件”的版本间的差异
来自Purtmars Wikipedia —— 普特莫斯维基
(建立内容为“{{:Chemdah 开发者文档目录}} = 自定义组件 = 组件指任务中的主动行为,常用于自动化、追踪等功能性的设置。均继承自 '''ink.…”的新页面) |
(没有差异)
|
2021年5月7日 (五) 08:56的最新版本
目录
- Chemdah
- 开始
- 基本
- 事件
- ink.ptms.chemdah.api.event.collect.ConversationEvents
- ink.ptms.chemdah.api.event.collect.ObjectiveEvents
- ink.ptms.chemdah.api.event.collect.PlayerEvents
- ink.ptms.chemdah.api.event.collect.QuestEvents
- ink.ptms.chemdah.api.event.collect.TemplateEvents
- ink.ptms.chemdah.api.event.InferEntityHookEvent
- ink.ptms.chemdah.api.event.InferItemHookEvent
- ink.ptms.chemdah.api.event.PartyHookEvent
- 对话相关
- 数据相关
- 任务相关
自定义组件
组件指任务中的主动行为,常用于自动化、追踪等功能性的设置。均继承自 ink.ptms.chemdah.core.quest.addon.Addon 类。
1 abstract class Addon(val config: ConfigurationSection, val questContainer: QuestContainer)
与元数据的写法基本相同,但是每一个组件的功能都是复杂的,这里我们只列举出最为经典的自动化组件(Github)作为参考。
1 companion object {
2
3 @TFunction.Init
4 fun init() {
5 // 向 Chemdah 注册组件类型
6 ChemdahAPI.addQuestAddon("foo", AddonFoo::class.java)
7 }
8 }
9 }
最后别忘记向 Chemdah 注册。