redis test

master
Alex 2022-03-27 20:31:28 +02:00
parent ca756c6895
commit c9eddca546
2 changed files with 10 additions and 20 deletions

View File

@ -8,8 +8,6 @@ import earth.krakatao.protocol.KraSocketClientProtocolMessage;
import earth.krakatao.protocol.KraSocketClientProtocolStatus;
import java.io.IOException;
import java.security.SecureRandom;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import net.krakatoa.proxy.ProxySystem;
@ -116,26 +114,12 @@ public class PostLoginListener implements Listener {
packer.close();
/* ProxySystem.getInstance().getRedisManager().getRedisKeyCommands()
.set("player:" + proxiedPlayer.getUniqueId().toString(),
packer.toByteArray());
/*
ProxySystem.getInstance().getRedisManager().getRedisHashCommands()
.hset("player", proxiedPlayer.getUniqueId().toString(), "online");
*/
Map<String, String> map = new HashMap<>();
map.put("skin", "steve");
map.put("money", "101001");
map.put("state", "online");
//ProxySystem.getInstance().getRedisManager().getRedisHashCommands()
// .hset("player", proxiedPlayer.getUniqueId().toString(), map);
RBucket<PlayerTest> bucket = ProxySystem.getInstance().getRedisManager().getRedissonClient()
.getBucket("player:" + proxiedPlayer.getUniqueId().toString());
ProxySystem.getInstance().getLogger().info("here1");
PlayerTest playerTest = new PlayerTest(proxiedPlayer.getName(), 250, "scooter");
PlayerTest playerTest = new PlayerTest("test", 250, "scooter");
ProxySystem.getInstance().getLogger()
.info("my playertest " + playerTest.getName() + playerTest.getCar());

View File

@ -5,8 +5,14 @@ import lombok.Data;
@Data
public class PlayerTest {
private final String name;
private final int money;
private final String car;
private String name;
private int money;
private String car;
public PlayerTest(String name, int money, String car) {
this.name = name;
this.money = money;
this.car = car;
}
}