修复数据文件中空行被读取导致错误

This commit is contained in:
SerendipityR 2022-08-20 19:07:20 +08:00 committed by GitHub
parent 7f7f7bd5b6
commit d121a4ee0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@ public class DataUtil {
if (dataFile.exists()) { if (dataFile.exists()) {
YamlConfiguration data = YamlConfiguration.loadConfiguration(dataFile); YamlConfiguration data = YamlConfiguration.loadConfiguration(dataFile);
botRegPasswords = data.getStringList("Data"); botRegPasswords = data.getStringList("Data");
botRegPasswords.remove("");
} else { } else {
botRegPasswords = new ArrayList<>(); botRegPasswords = new ArrayList<>();
} }