mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-12-23 02:28:01 +00:00
fix null being passed into jedis on ServerConnectedEvent
This commit is contained in:
parent
9da5845da3
commit
c787c76eca
@ -165,7 +165,7 @@ public class RedisBungeeBungeeListener extends AbstractRedisBungeeListener<Login
|
||||
@Override
|
||||
@EventHandler
|
||||
public void onServerChange(ServerConnectedEvent event) {
|
||||
final String currentServer = event.getPlayer().getServer() == null ? null : event.getPlayer().getServer().getInfo().getName();
|
||||
final String currentServer = event.getServer().getInfo().getName();
|
||||
final String oldServer = event.getPlayer().getServer() == null ? null : event.getPlayer().getServer().getInfo().getName();
|
||||
plugin.executeAsync(new RedisTask<Void>(plugin) {
|
||||
@Override
|
||||
|
@ -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) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user