mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-12-23 02:28:01 +00:00
oops: forgot to cache uuids/name of joined player
This commit is contained in:
parent
27358d2f5f
commit
b9c7c31c09
@ -161,13 +161,13 @@ public abstract class PlayerDataManager<P, LE, DE, PS extends IPubSubMessageEven
|
||||
unifiedJedis.hset("redis-bungee::" + this.networkId + "::player::" + uuid + "::data", data);
|
||||
}
|
||||
|
||||
protected void addPlayer(final UUID uuid, final InetAddress inetAddress) {
|
||||
protected void addPlayer(final UUID uuid, final String name, final InetAddress inetAddress) {
|
||||
Map<String, String> redisData = new HashMap<>();
|
||||
redisData.put("last-online", String.valueOf(0));
|
||||
redisData.put("proxy", this.proxyId);
|
||||
redisData.put("ip", inetAddress.getHostAddress());
|
||||
unifiedJedis.hset("redis-bungee::" + this.networkId + "::player::" + uuid + "::data", redisData);
|
||||
|
||||
plugin.getUuidTranslator().persistInfo(name, uuid, this.unifiedJedis);
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("proxy", this.proxyId);
|
||||
data.put("uuid", uuid);
|
||||
|
@ -84,7 +84,7 @@ public class BungeePlayerDataManager extends PlayerDataManager<ProxiedPlayer, Po
|
||||
@Override
|
||||
@EventHandler
|
||||
public void onLoginEvent(PostLoginEvent event) {
|
||||
super.addPlayer(event.getPlayer().getUniqueId(), event.getPlayer().getAddress().getAddress());
|
||||
super.addPlayer(event.getPlayer().getUniqueId(), event.getPlayer().getName(), event.getPlayer().getAddress().getAddress());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -84,7 +84,7 @@ public class VelocityPlayerDataManager extends PlayerDataManager<Player, PostLog
|
||||
@Override
|
||||
@Subscribe
|
||||
public void onLoginEvent(PostLoginEvent event) {
|
||||
addPlayer(event.getPlayer().getUniqueId(), event.getPlayer().getRemoteAddress().getAddress());
|
||||
addPlayer(event.getPlayer().getUniqueId(), event.getPlayer().getUsername(), event.getPlayer().getRemoteAddress().getAddress());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user