debug: mongodb document subscriber

master
Alex 2022-04-14 13:55:42 +02:00
parent 931c6a4ade
commit 12fb9cb453
1 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,9 @@
package net.krakatoa.proxy.listener;
import com.mongodb.client.model.Filters;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Maybe;
import io.reactivex.rxjava3.core.Observable;
import java.io.IOException;
import java.security.SecureRandom;
import net.krakatoa.proxy.ProxySystem;
@ -57,6 +60,12 @@ public class PostLoginListener implements Listener {
});
ProxySystem.getInstance().getLogger().info("debug2 testa");
@NonNull Maybe<Document> playerDocument = Observable.fromPublisher(
ProxySystem.getInstance().getMongoManager().getPlayersCollection()
.find(Filters.eq("uuid", uuid)).first()).firstElement();
ProxySystem.getInstance().getLogger().info("playerDocument " + playerDocument);
/*