Skip to content

Fix VelocityPlugin to use proxyServer for server lookup#4

Closed
kmaba wants to merge 1 commit intomainfrom
fix-velocity-plugin
Closed

Fix VelocityPlugin to use proxyServer for server lookup#4
kmaba wants to merge 1 commit intomainfrom
fix-velocity-plugin

Conversation

@kmaba
Copy link
Owner

@kmaba kmaba commented Jan 30, 2025

Rewrite the VelocityPlugin.java file to use the proxyServer field for server lookup instead of the event.

  • Add private final ProxyServer proxyServer field to the VelocityPlugin class.
  • Update the constructor to accept a ProxyServer parameter and initialize the proxyServer field.
  • Replace event.getServer().getServer() with proxyServer.getServer() in the onProxyInitialization method.
  • Ensure the proxyServer field is used for server lookup in the onPlayerJoin method.
  • Remove unnecessary import of java.io.File.
  • Correct the logger statement in the onPlayerJoin method to include the player's username.

Rewrite the `VelocityPlugin.java` file to use the `proxyServer` field for server lookup instead of the event.

- Add `private final ProxyServer proxyServer` field to the `VelocityPlugin` class.
- Update the constructor to accept a `ProxyServer` parameter and initialize the `proxyServer` field.
- Replace `event.getServer().getServer()` with `proxyServer.getServer()` in the `onProxyInitialization` method.
- Ensure the `proxyServer` field is used for server lookup in the `onPlayerJoin` method.
- Remove unnecessary import of `java.io.File`.
- Correct the logger statement in the `onPlayerJoin` method to include the player's username.
@kmaba kmaba closed this Jan 31, 2025
@kmaba kmaba deleted the fix-velocity-plugin branch January 31, 2025 09:48
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.

1 participant