save the player in the database again when the player leaves the server

master
Alex 2022-04-05 20:31:30 +02:00
parent dfa48408d8
commit 10d6446688
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ public class PlayerDisconnectListener implements Listener {
UpdateOptions options = new UpdateOptions().upsert(true);
System.out.println("doc: " + document.keySet());
ProxySystem.getInstance().getMongoManager().getPlayers()
.updateOne(document, updates, options, (result, t) -> {
System.out.println(result == null);