Compare commits
No commits in common. "5d2c9e249cc331f16d2530c14bd6bfadb35c828c" and "56b939d385146a82c9b5ad0248b52952b013bbe1" have entirely different histories.
5d2c9e249c
...
56b939d385
|
@ -8,7 +8,6 @@ import net.md_5.bungee.api.CommandSender;
|
|||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.plugin.Command;
|
||||
import org.redisson.api.RMap;
|
||||
|
||||
public class KrakatoapCommand extends Command {
|
||||
|
||||
|
@ -32,20 +31,6 @@ public class KrakatoapCommand extends Command {
|
|||
.getSendQueueMessages().size(), ProxySystem.getInstance()
|
||||
.getKraSocketClientProtocol()
|
||||
.getReceivedQueueMessages().size())));
|
||||
|
||||
String uuid = ProxySystem.getInstance().getFormatter()
|
||||
.formatUuid(player.getUniqueId().toString());
|
||||
|
||||
RMap<String, String> map = ProxySystem.getInstance().getRedisManager()
|
||||
.getRedissonClient()
|
||||
.getMap("player:" + uuid);
|
||||
|
||||
if (!map.isEmpty()) {
|
||||
player.sendMessage(new TextComponent("\n§7Redis player data:"));
|
||||
map.forEach((key, value) -> {
|
||||
player.sendMessage(new TextComponent("§7key: §e" + key + " §7value: §e" + value));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package net.krakatoa.proxy.listener;
|
||||
|
||||
import net.krakatoa.proxy.ProxySystem;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
||||
import net.md_5.bungee.api.plugin.Listener;
|
||||
import net.md_5.bungee.event.EventHandler;
|
||||
import org.redisson.api.RMap;
|
||||
|
||||
public class PlayerDisconnectListener implements Listener {
|
||||
|
||||
|
@ -13,18 +11,6 @@ public class PlayerDisconnectListener implements Listener {
|
|||
public void onDisconnect(PlayerDisconnectEvent event) {
|
||||
ProxiedPlayer proxiedPlayer = event.getPlayer();
|
||||
|
||||
String uuid = ProxySystem.getInstance().getFormatter()
|
||||
.formatUuid(proxiedPlayer.getUniqueId().toString());
|
||||
|
||||
// redis
|
||||
RMap<String, String> map = ProxySystem.getInstance().getRedisManager()
|
||||
.getRedissonClient()
|
||||
.getMap("player:" + uuid);
|
||||
|
||||
if (!map.isEmpty()) {
|
||||
map.delete();
|
||||
}
|
||||
|
||||
/*Long res = ProxySystem.getInstance().getRedisManager().getRedisKeyCommands()
|
||||
.del("player:" + proxiedPlayer.getUniqueId().toString());
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import earth.krakatao.protocol.KraSocketClientProtocolMessage;
|
|||
import earth.krakatao.protocol.KraSocketClientProtocolStatus;
|
||||
import java.io.IOException;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Consumer;
|
||||
import net.krakatoa.proxy.ProxySystem;
|
||||
|
@ -81,11 +80,9 @@ public class PostLoginListener implements Listener {
|
|||
map.put("voiceWebCode", "voiceWebCode");
|
||||
|
||||
document.forEach((key, value) -> {
|
||||
if (!Objects.equals(key, "_id")) {
|
||||
ProxySystem.getInstance().getLogger()
|
||||
.info("key " + key + " value " + value.toString());
|
||||
map.put(key, value.toString());
|
||||
}
|
||||
ProxySystem.getInstance().getLogger()
|
||||
.info("key " + key + " value " + value.toString());
|
||||
map.put(key, value.toString());
|
||||
});
|
||||
ProxySystem.getInstance().getLogger().info("PUT !");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue