Skip to content

Commit

Permalink
修复 无配置加载报错
Browse files Browse the repository at this point in the history
  • Loading branch information
liuqianpan2008 committed Feb 12, 2022
1 parent 9ef7059 commit bc2070d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/main/java/org/fenglin/WhoUndercover.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ private WhoUndercover() {
public void onEnable() {
CommandManager.INSTANCE.registerCommand(new Undercover(),true);
reloadPluginData(MyDate.MyDate);
// List<Map<String,String>> data=new ArrayList<>();
// Map<String,String> map=new HashMap<>();
// map.put("1","2");
// data.add(map);
// MyDate.MyDate.setWorld(data);
System.out.println(MyDate.MyDate.getWorld().get(0));
getLogger().info("谁是卧底,加载成功!");
}
}
4 changes: 3 additions & 1 deletion src/main/java/org/fenglin/data/MyDate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import net.mamoe.mirai.console.data.value

class MyDate {
companion object MyDate : AutoSavePluginData("world") { // 词条库
var world: List<Map<String,String>> by value()
var world: List<Map<String,String>> by value(mutableListOf<Map<String,String>>(
mapOf("玩家词条" to "卧底词条")
))
}
}

0 comments on commit bc2070d

Please sign in to comment.