fix issues with scoreboard saving

This commit is contained in:
Aubri Seebauer committed 2023-04-21 16:38:10 -04:00
1 parent 30d7cdb28b
commit 55c4c9b0e2
3 files changed
+71 -31

No files matched your search

@@ -110,7 +110,6 @@ public class DataManager {
try {
return Files.deleteIfExists(file.toPath());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}
@@ -147,9 +146,9 @@ public class DataManager {
for (String path : paths) {
File file = new File(dataFolder + File.separator + path);
if (!file.exists()) {
HashMap<String, Object> data = new HashMap<>();
data.put("players", new ArrayList<String>());
saveData(path, data);
HashMap<String, Object> raw = new HashMap<>();
raw.put("scores", new HashMap<String, Object>());
saveData(path, raw);
EntityBingo.getInstance().getLogger().info("Couldn't find file \"" + path + "\", generated default.");
} else {
EntityBingo.getInstance().getLogger().info("Found existing scoreboard file at " + dataFolder + File.separator + path);