-
-
Notifications
You must be signed in to change notification settings - Fork 149
Workaround for Floodgate prefixes with ProtocolLlib #566
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
Conversation
|
So the packet handler will run before or after Floodgate? I'm kind of afraid of integrating a implementation specific solution. This could break very fast. What I also wondered about the cases where it tries to login while a player is online. What will happen if a player with the same name is already online and is either a floodgate player or not? This could potentially allow it skip authentication, doesn't it? |
This is the Pipeline's order of the packet: So ProtocolLib's listeners run before Floodgate's.
This is supposed to be a temporary workaround until I (or someone) figure out the cause of the issue. It's not an issue with FastLogin's code. Simply registering an async
I'm not 100% sure about this, so I'll test it when I'll have more time.
This could be a separate module / JAR file. Or it could even be a separate Bukkit plugin. It wouldn't require any code changes to FastLogin. I might make a separate repository for this. |
This could be potentially problematic, because we want to depend on a status check that doesn't even ran yet. I think FastLogin's code should run after that from Floodgate for this. Therefore Floodgate is able to make its checks and change the name if required to. Maybe we need to depend on some status result checks from Floodgate if the plugin is available. The following is outdated, because it assumes the existing order (FastLogin and then Floodgate):
Then maybe we could refactor the code to synchronous listening. I have two ideas:
|
This can be used as a workaround for TuxCoding#493 This will leave https://github.com/GeyserMC/Floodgate/blob/821be02bdb179f7d4ba7b0ec79bbc721c28105f5/spigot/src/main/java/org/geysermc/floodgate/addon/data/SpigotDataHandler.java in a limbo state, but it shouldn't have a noticable impact on neither performance nor stability. This commit will try append prefixes to every player, even if it's not needed of if Floodgate isn't installed.
Without this patch, Java players would also get a prefix.
f4c56b4 to
03850ae
Compare
...rc/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ManualNameChange.java
Show resolved
Hide resolved
|
People started merging this branch to their fork, so I thought that at least I would resolve merge conflicts. That's why I've pushed some commits. |
|
Because this option is opt-in, I'll merge it. Maybe we need propose a specific API on the Floodgate project to fix this issue. |
Summary of your change
Made FastLogin add Floodgate player name prefixes, if Floodgate fails to do it.
Added
floodgatePrefixWorkaroundto config.yml to enable or disable this feature.Related issue
Proposes a workaround / fixes #493
Notes
This will leave Floodgate/SpigotDataHandler.java in a limbo state, so it'll run some code (mostly if checks to decide if it's receiving a login packet) but it didn't have a noticeable impact on performance and it also seemed to be stable.