games647 / FastLogin

Checks if a minecraft player has a valid paid account. If so, they can skip offline authentication automatically. (premium auto login)
https://www.spigotmc.org/resources/fastlogin.14153
MIT License
492 stars 120 forks source link

Other plugins PreLoginEvent deny reason does not show, player gets disconnected with timeout. (Velocity) #1146

Closed GregorSomething closed 7 months ago

GregorSomething commented 7 months ago

What happened?

When player connects to server and some plugin handles PreLoginEvent (Velocity) before FastLogin, then player gets disconnected with time out exception. This is due to miss handled Continuation in FastLogins PreLoginEvent. https://github.com/games647/FastLogin/blob/108f5ad32404c0be029e3801fd03b93a096a59d7/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/ConnectListener.java#L74-L76 Does not let event to resume and same is here https://github.com/games647/FastLogin/blob/108f5ad32404c0be029e3801fd03b93a096a59d7/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/ConnectListener.java#L84-L94 Line is missing before return or break

continuation.resume();

What did you expect?

Player would get instantly disconnected with correct reason.

Steps to reproduce

  1. Write a plugin that would subscribe to event PreLoginEvent with PostOrder.EARLY or FIRST.
  2. Set result to deny with or without a reason.
  3. FastLogin causes time out for this connection.
  4. Player does not see correct disconnect reason.

Plugin list

my-plugin, fastlogin

Configuration file

No response

Server log

No response

Plugin version

1.12-SNAPSHOT-108f5ad

Platform

Velocity

Relevance

games647 commented 7 months ago

Oh, yes that's an oversight. Thank you very much.