diff --git a/README.md b/README.md index 976dd87..5c30705 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@

+[***查看插件列表***](./markdown/plugin-list.md) + 介绍 (v1.2.0): -------- @@ -495,9 +497,32 @@ public class TestCommand implements EverywhereCommand } ``` -### 6. 插件配置: +### 6. 使用配置文件: + +* 写一个默认配置文件`config.yml`放进`main/src/resources`里 (不然使用getConfig会返回null). +* 然后就可以用了 +* 存储位置在`运行目录/plugins/插件名/config.yml`. + +例子: 默认配置`config.yml`: -TODO! +```yml +TestBoolean1: true +TestList1: +- 871674895 +- 666666666 +TestList2: [] +TestKey1: + TestKey2: TestValue +``` + +例子: 从程序里访问: + +```java +getConfig().getBoolean("TestBoolean1"); // 返回TestBoolean1字段的值 +getConfig().getStringList("TestList1"); // 返回TestList1字段的字符串数组 +getConfig().getStringList("TestList2"); // 返回TestList2字段的字符串数组 +getConfig().getString("TestKey1.TestKey2"); // 返回TestKey1下的TestKey2字段的值 +``` ### 7. 构建插件: diff --git a/markdown/plugin-list.md b/markdown/plugin-list.md new file mode 100644 index 0000000..346305b --- /dev/null +++ b/markdown/plugin-list.md @@ -0,0 +1,21 @@ +##### [PicqBotX 插件管理器](https://github.com/HyDevelop/PicqBotX-PluginManager) > 插件列表 + +
+ +HyDEV插件: +-------- + +#### 基础插件: + +* 权限管理: [PicqPermissionManager](https://github.com/HyDEV-Plugins/PicqPermissionManager) + +
+ +第三方开发插件: +-------- + +* 还没有... + +
+ +##### 如果写了新的开源插件欢迎联系我加到这个列表里 - QQ: 871674895 / admin@moecraft.cc