[英]I'm creating a spigot plugin, and the config file that appears on my test server doesn't match the one in Intellij
我的配置文件的部分具體是這樣的:
Players:
"examplePlayer1":
- 10
- 0
"examplePlayer2":
- 75
- 3
這就是它在 Intellij 中的樣子,但是當我 package 插件並將其放入我的測試服務器時,配置文件如下所示:
Players:
- examplePlayer:
- 10
- 0
那是一個舊版本,由於某些原因無法正常工作,所以我更改了它,但現在新配置不會保存到服務器。
在我的 OnEnable 方法中,我有這一行: getConfig().options().copyDefaults();
在我的 OnDisable 方法中,我有: saveConfig();
有誰知道我做錯了什么? 謝謝!
我不得不調用saveDefaultConfig();
在我的 OnEnable 方法中...哎呀
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.