Skip to content

Conversation

BorisP1234
Copy link
Contributor

@BorisP1234 BorisP1234 commented Jun 9, 2025

fixes #539
Also fixes the logs in the console about on which server the player is (currently always says that a player joined the initial server).

robinbraemer added a commit that referenced this pull request Jun 12, 2025
fixes #539
closes #540

- Added a `previousServer` field to `ServerPreConnectEvent` and `serverConnection` to track the server a player was previously connected to.
- Updated constructors and methods to accommodate the new `previousServer` parameter, improving connection request handling and event firing.
- Enhanced `createConnectionRequest` to include the previous connection for better context during server transitions.
@BorisP1234 BorisP1234 closed this Jun 12, 2025
robinbraemer added a commit that referenced this pull request Jun 13, 2025
* fix: PreviousServer is always nil

fixes #539
closes #540

- Added a `previousServer` field to `ServerPreConnectEvent` and `serverConnection` to track the server a player was previously connected to.
- Updated constructors and methods to accommodate the new `previousServer` parameter, improving connection request handling and event firing.
- Enhanced `createConnectionRequest` to include the previous connection for better context during server transitions.

* fix: Prevent storing typed nil pointers for previousServer

- Updated the handling of the previousServer field in ServerConnectedEvent and ServerPostConnectEvent to ensure it is only assigned when non-nil, preventing incorrect nil pointer storage.
- This change enhances the integrity of event data during server transitions, ensuring accurate tracking of previous connections.
@BorisP1234 BorisP1234 deleted the fix/previous-server-always-nil branch July 22, 2025 22:19
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.

bug: PreviousServer is always nil
1 participant