From d34172412ca784fe23726d98eafa57df11d04edc Mon Sep 17 00:00:00 2001 From: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com> Date: Sat, 11 Jun 2022 19:02:23 +0300 Subject: [PATCH] Fix join address gathering Affects issues: - Fixed #2413 --- .../plan/gathering/listeners/bukkit/PlayerOnlineListener.java | 2 +- .../plan/gathering/listeners/fabric/PlayerOnlineListener.java | 2 +- .../plan/gathering/listeners/sponge/PlayerOnlineListener.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Plan/bukkit/src/main/java/com/djrapitops/plan/gathering/listeners/bukkit/PlayerOnlineListener.java b/Plan/bukkit/src/main/java/com/djrapitops/plan/gathering/listeners/bukkit/PlayerOnlineListener.java index e45cc47209..a577e9b516 100644 --- a/Plan/bukkit/src/main/java/com/djrapitops/plan/gathering/listeners/bukkit/PlayerOnlineListener.java +++ b/Plan/bukkit/src/main/java/com/djrapitops/plan/gathering/listeners/bukkit/PlayerOnlineListener.java @@ -195,7 +195,7 @@ private void actOnJoinEvent(PlayerJoinEvent event) { ActiveSession session = new ActiveSession(playerUUID, serverUUID, time, world, gm); session.getExtraData().put(PlayerName.class, new PlayerName(playerName)); session.getExtraData().put(ServerName.class, new ServerName(serverInfo.getServer().getIdentifiableName())); - session.getExtraData().put(JoinAddress.class, new JoinAddress(getHostName)); + session.getExtraData().put(JoinAddress.class, new JoinAddress(getHostName.get())); sessionCache.cacheSession(playerUUID, session) .map(StoreSessionTransaction::new) .ifPresent(database::executeTransaction); diff --git a/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/fabric/PlayerOnlineListener.java b/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/fabric/PlayerOnlineListener.java index d1e6a4951c..36efa61c35 100644 --- a/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/fabric/PlayerOnlineListener.java +++ b/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/fabric/PlayerOnlineListener.java @@ -204,7 +204,7 @@ private void actOnJoinEvent(ServerPlayerEntity player) { ActiveSession session = new ActiveSession(playerUUID, serverUUID, time, world, gm); session.getExtraData().put(PlayerName.class, new PlayerName(playerName)); session.getExtraData().put(ServerName.class, new ServerName(serverInfo.getServer().getIdentifiableName())); - session.getExtraData().put(JoinAddress.class, new JoinAddress(getHostName)); + session.getExtraData().put(JoinAddress.class, new JoinAddress(getHostName.get())); sessionCache.cacheSession(playerUUID, session) .ifPresent(previousSession -> database.executeTransaction(new StoreSessionTransaction(previousSession))); diff --git a/Plan/sponge/src/main/java/com/djrapitops/plan/gathering/listeners/sponge/PlayerOnlineListener.java b/Plan/sponge/src/main/java/com/djrapitops/plan/gathering/listeners/sponge/PlayerOnlineListener.java index e6e3c3270f..beb409954f 100644 --- a/Plan/sponge/src/main/java/com/djrapitops/plan/gathering/listeners/sponge/PlayerOnlineListener.java +++ b/Plan/sponge/src/main/java/com/djrapitops/plan/gathering/listeners/sponge/PlayerOnlineListener.java @@ -185,7 +185,7 @@ private void actOnJoinEvent(ClientConnectionEvent.Join event) { ActiveSession session = new ActiveSession(playerUUID, serverUUID, time, world, gm); session.getExtraData().put(PlayerName.class, new PlayerName(playerName)); session.getExtraData().put(ServerName.class, new ServerName(serverInfo.getServer().getIdentifiableName())); - session.getExtraData().put(JoinAddress.class, new JoinAddress(getHostName)); + session.getExtraData().put(JoinAddress.class, new JoinAddress(getHostName.get())); sessionCache.cacheSession(playerUUID, session) .map(StoreSessionTransaction::new) .ifPresent(database::executeTransaction);