mirror of
https://github.com/darksaid98/EntityBingo.git
synced 2026-12-01 15:58:46 +00:00
save scoreboard
This commit is contained in:
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
&4[ClearLag] Warning Ground items will be removed in seconds!
|
||||
&6[ClearLag] &aRemoved +RemoveAmount Entities!'
|
||||
Reference in new issue
Block a user