diff --git a/PluginDocs/SomeMethod.MD b/PluginDocs/PluginStructure.MD similarity index 100% rename from PluginDocs/SomeMethod.MD rename to PluginDocs/PluginStructure.MD diff --git a/PluginDocs/ToStart.MD b/PluginDocs/ToStart.MD index b87520419..ef431a66f 100644 --- a/PluginDocs/ToStart.MD +++ b/PluginDocs/ToStart.MD @@ -58,7 +58,8 @@ javac 1.8.0_60-ea ``` - 检查是否配置成功。 #### IDE -IDE,即集成开发环境,是辅助编程开发的软件。使用合适的IDE能有效地减少代码语法错误、编译麻烦等问题,加大开发效率。目前java开发者常用的IDE有Eclipse,NetBeans,IntelliJ IDEA等软件。我这里使用IntelliJ IDEA 14.1(以下简称“IDEA”)与windows 7系统为例子,来讲IDE的安装和配置。 +IDE,即集成开发环境,是辅助编程开发的软件。使用合适的IDE能有效地减少代码语法错误、编译麻烦等问题,加大开发效率。目前java开发者常用的IDE有Eclipse,NetBeans,IntelliJ IDEA等软件。我这里使用IntelliJ IDEA 14.1(以下简称“IDEA”)与windows 7系统为例子,来讲IDE的安装和配置。
+强烈推荐IDEA, IDEA可以使用idea插件[mirai-console-intellij](https://github.com/mamoe/mirai-console-intellij)快速进行插件开发
打开[IntelliJ IDEA的官方网站]( http://www.jetbrains.com/idea/),点击“Get IntelliJ IDEA now”
@@ -66,9 +67,55 @@ IDEA分付费的Ultimate版和免费的Community版,选择自己的系统后
### 我要如何开始 -**此处使用IDEA作为演示IDE** +**此处使用IDEA作为演示IDE**
+新手只推荐使用IDEA, 如执着于不使用idea, 可以阅读[PluginStructure](PluginStructure.MD)手动构建插件环境
+ +#### IDE准备 +安装idea插件[mirai-console-intellij](https://github.com/mamoe/mirai-console-intellij), 这是一个用于快速创建Mirai Console插件的IDE插件
+1: 自动安装
+打开IDEA, 点击Preferences, 点击插件[Plugins], 市场[Market place], 搜索Mirai, 安装Mirai-Console
+预计2020/3/11号后才可以在market里搜索到
+
+ +2: 手动安装
+前往[这里](https://github.com/mamoe/mirai-console-intellij/releases)下载最新的插件[.jar]
+打开IDEA, 点击Preferences, 按下图操作, 选择下载的jar 然后重启IDE
+![如何手动安装](assets/ideaInstall.png) + +
+ +#### 启动项目 +1: 点击New Project
+2: 在左侧选择Mirai Console Plugin
+3: 根据下图辅助填写信息
+![填写信息1](assets/ideaplugin1.jpg) +4: 点击[next]
+5: 根据下图辅助继续填写信息
+![填写信息2](assets/ideaplugin2.jpg) +6: 点击[next]
+7: 最后一页与本地储存位置有关, 如不懂使用默认即可
+8: 点击[Finish]稍作等待
+9: 等待这个页面加载出来
+![how it look like](assets/ideaplugin3.png) +10: 点击右下↘的Import gradle project或Import Maven Project
+11: 等待进度条结束
+![bar](assets/ideaplugin4.png) +12: 等待这个页面加载出来(这是第一页选的Java语言, kotlin类似)
+![how it look like2](assets/ideaplugin5.png) +13: 插件环境正式完成
+#### 如何打包插件 +1: 根据下图帮助打开gradle window[maven同理]
+![namnamnam](assets/ideaplugin6.jpg) +2: 根据下图帮助点击JAR
+![NMSLNMSL](assets/ideaplugin7.png) +3: 在这里找到成品, 完成
+![NMSLNMSL](assets/ideaplugin8.png) + +PS: 如果要打包有依赖lib的插件, 请继续向后读
+ + 本章部分章节引用自[搭建环境 - Nukkit插件从0开始](https://www.cnblogs.com/xtypr/p/nukkit_plugin_start_from_0_build_environment.html), diff --git a/PluginDocs/assets/ideaInstall.png b/PluginDocs/assets/ideaInstall.png new file mode 100644 index 000000000..25fc4a3f3 Binary files /dev/null and b/PluginDocs/assets/ideaInstall.png differ diff --git a/PluginDocs/assets/ideaplugin1.jpg b/PluginDocs/assets/ideaplugin1.jpg new file mode 100644 index 000000000..b0a3e6267 Binary files /dev/null and b/PluginDocs/assets/ideaplugin1.jpg differ diff --git a/PluginDocs/assets/ideaplugin2.jpg b/PluginDocs/assets/ideaplugin2.jpg new file mode 100644 index 000000000..c91c12139 Binary files /dev/null and b/PluginDocs/assets/ideaplugin2.jpg differ diff --git a/PluginDocs/assets/ideaplugin3.png b/PluginDocs/assets/ideaplugin3.png new file mode 100644 index 000000000..e6f1cea56 Binary files /dev/null and b/PluginDocs/assets/ideaplugin3.png differ diff --git a/PluginDocs/assets/ideaplugin4.png b/PluginDocs/assets/ideaplugin4.png new file mode 100644 index 000000000..1dda62172 Binary files /dev/null and b/PluginDocs/assets/ideaplugin4.png differ diff --git a/PluginDocs/assets/ideaplugin5.png b/PluginDocs/assets/ideaplugin5.png new file mode 100644 index 000000000..8f1cb6880 Binary files /dev/null and b/PluginDocs/assets/ideaplugin5.png differ diff --git a/PluginDocs/assets/ideaplugin6.jpg b/PluginDocs/assets/ideaplugin6.jpg new file mode 100644 index 000000000..bf4e26d2e Binary files /dev/null and b/PluginDocs/assets/ideaplugin6.jpg differ diff --git a/PluginDocs/assets/ideaplugin7.png b/PluginDocs/assets/ideaplugin7.png new file mode 100644 index 000000000..d4f0886cd Binary files /dev/null and b/PluginDocs/assets/ideaplugin7.png differ diff --git a/PluginDocs/assets/ideaplugin8.png b/PluginDocs/assets/ideaplugin8.png new file mode 100644 index 000000000..06e4cde11 Binary files /dev/null and b/PluginDocs/assets/ideaplugin8.png differ