save scoreboard

This commit is contained in:
Aubri Seebauer committed 2023-04-21 13:58:56 -04:00
1 parent d644d1e25b
commit e0b74dbcf9
2 files changed
+9 -3

No files matched your search

@@ -78,11 +78,19 @@ public class ChatListener implements Listener {
Bukkit.broadcastMessage(chatLabel() + "No one guessed correctly.");
EntityBingo.getInstance().getLogger().info(chatLabel() + "No one guessed correctly.");
} else {
HashMap<String, Object> data = DataManager.getData("scoreboard.yml");
for (String s : winners) {
Bukkit.broadcastMessage(chatLabel() + s + " guessed correctly!");
EntityBingo.getInstance().getLogger().info(chatLabel() + s + " guessed correctly!");
if(data != null) {
if(data.containsKey(s)) {
data.put(s, (int) data.get(s) + 1);
} else {
data.put(s, 1);
}
}
}
DataManager.saveData("scoreboard.yml", data);
}
-2
View File
@@ -1,2 +0,0 @@
&4[ClearLag] Warning Ground items will be removed in seconds!
&6[ClearLag] &aRemoved +RemoveAmount Entities!'