Skip to content

fix player address sending#9

Merged
tunikakeks merged 3 commits into
mainfrom
development
Mar 26, 2026
Merged

fix player address sending#9
tunikakeks merged 3 commits into
mainfrom
development

Conversation

@tunikakeks
Copy link
Copy Markdown
Member

No description provided.

@tunikakeks tunikakeks merged commit 7110fa5 into main Mar 26, 2026
2 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bdafc3f3a3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +67 to +68
if(player.getDownstreamConnection() != null && fallbackOnJoin)
return fallback;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Honor fallback_on_join for initial join selection

fetchServer only returns the configured fallback when player.getDownstreamConnection() != null, but the join-handler path (determineServer) runs before a downstream connection exists, so with fallback_on_join=true and no hub available the method returns null instead of the fallback server. This can block first-time joins during hub outages even though fallback is configured.

Useful? React with 👍 / 👎.

ProxiedPlayer player = ev.getPlayer();

if(!ev.isCancelled()) CloudInterface.getInstance().playerLogin(player.getName(), player.getUniqueId().toString(), player.getAddress().getHostName());
if(!ev.isCancelled()) CloudInterface.getInstance().playerLogin(player.getName(), player.getUniqueId().toString(), player.getAddress().toString());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Send IP address without ephemeral source port

Switching login reporting to SocketAddress.toString() sends values that include the client source port (and sometimes extra formatting), so the ip field becomes different on every reconnect from the same client. This breaks stable IP-based tracking/lookup semantics for playerLogin and affects all newly changed listeners using this pattern.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants