2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2026-04-08 16:10:26 +00:00

fix null being passed into jedis on ServerConnectedEvent

This commit is contained in:
2022-07-20 13:25:26 +04:00
parent 9da5845da3
commit c787c76eca
2 changed files with 2 additions and 3 deletions

View File

@@ -157,8 +157,7 @@ public class RedisBungeeVelocityListener extends AbstractRedisBungeeListener<Log
@Override
@Subscribe
public void onServerChange(ServerConnectedEvent event) {
Optional<ServerConnection> optionalServerConnection = event.getPlayer().getCurrentServer();
final String currentServer = optionalServerConnection.map(serverConnection -> serverConnection.getServerInfo().getName()).orElse(null);
final String currentServer = event.getServer().getServerInfo().getName();
final String oldServer = event.getPreviousServer().map(serverConnection -> serverConnection.getServerInfo().getName()).orElse(null);
plugin.executeAsync(new RedisTask<Void>(plugin) {