Skip to content

插件开发概览

Neo-MoFox 插件系统为开发者提供了一套灵活、类型安全的组件模型,支持从目录、ZIP 压缩包或 .mfp 格式加载插件。

源码对齐说明

本章 API 与行为说明按当前 Neo-MoFox 实现对齐(CORE_VERSION = 1.0.0)。

前置知识

如果你还不了解 Neo-MoFox 插件系统的工作原理,建议先阅读 插件机制原理

开发前准备

环境依赖

bash
# 安装项目依赖
uv sync

# 运行测试确认环境正常
pytest

# 运行代码检查
ruff check src/

插件放置位置

插件应放置在项目根目录的 plugins/ 文件夹中:

Neo-MoFox/
└── plugins/
    └── your_plugin/          # 目录形式
        ├── manifest.json
        └── plugin.py

框架也支持:

  • ZIP 压缩包plugins/your_plugin.zip
  • MFP 包plugins/your_plugin.mfp(本质上是特殊后缀的 ZIP)

开始开发

贡献者

The avatar of contributor named as minecraft1024a minecraft1024a
The avatar of contributor named as qf qf
The avatar of contributor named as Claude Opus 4.7 Claude Opus 4.7
The avatar of contributor named as micraft1024a micraft1024a

页面历史

Released under the GPL-3.0 License.