Skip to content

Commit

Permalink
Fix join address gathering
Browse files Browse the repository at this point in the history
Affects issues:
- Fixed #2413
  • Loading branch information
AuroraLS3 committed Jun 11, 2022
1 parent 2dade92 commit d341724
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d341724

Please sign in to comment.