Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug/Compatibility] Joining server message incorrect #11

Closed
voruti opened this issue Nov 3, 2022 · 3 comments · Fixed by #12
Closed

[Bug/Compatibility] Joining server message incorrect #11

voruti opened this issue Nov 3, 2022 · 3 comments · Fixed by #12

Comments

@voruti
Copy link
Contributor

voruti commented Nov 3, 2022

With the config line

[discord.chat]
join_message = "*{username} joined {server}*"

the wrong server is output in Discord. It shows the default server (lobby) instead of the server I'm actually joining.
I'm using this plugin to rejoin the last server I was connected to: https://github.com/Matt-MX/ReconnectVelocity

@unilock
Copy link
Contributor

unilock commented Nov 4, 2022

That may have been my fault... (#3)
Could you try this commit? I switched the server connect methods from PlayerChooseInitialServerEvent and ServerPostConnectEvent to only ServerConnectedEvent, which may have something to do with your issue. Also, I haven't tested this change yet at all, and don't have the time to do so right now, so if you could do that for me... ;)

@voruti
Copy link
Contributor Author

voruti commented Nov 5, 2022

Almost:
screen

@unilock
Copy link
Contributor

unilock commented Nov 5, 2022

Yeah, I think I used var server = event.getServer().getServerInfo(); instead of var server = event.getServer().getServerInfo().getName();. My bad. I've since rewritten the history of that branch, so let's pretend that never happened ;)

The fixed commit is here: unilock@c0115e6

Though I've continued working on the branch to implement a customizable webhook username, so I'll be opening a pull request regardless.

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 a pull request may close this issue.

2 participants