added debug for redis player data

master
Alex 2022-04-04 21:54:41 +02:00
parent 289ef5440e
commit 5d2c9e249c
1 changed files with 15 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Command; import net.md_5.bungee.api.plugin.Command;
import org.redisson.api.RMap;
public class KrakatoapCommand extends Command { public class KrakatoapCommand extends Command {
@ -31,6 +32,20 @@ public class KrakatoapCommand extends Command {
.getSendQueueMessages().size(), ProxySystem.getInstance() .getSendQueueMessages().size(), ProxySystem.getInstance()
.getKraSocketClientProtocol() .getKraSocketClientProtocol()
.getReceivedQueueMessages().size()))); .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));
});
}
} }
} }
} }