-
-
Notifications
You must be signed in to change notification settings - Fork 142
Add support for Standalone Geyser (without Floodgate) #637
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
Add support for Standalone Geyser (without Floodgate) #637
Conversation
Ummm, it built fine on my computer... and I have even cleared the Geyser repo from my cache. EDIT: OK, it's because Ubuntu 20.04 (CI) server builds with Java 11, while I use Java 17 on my PC. I'll try to run my Java 17 build on a Java 11 server. If it doesn't work, I'll downgrade Geyser in pom.xml. |
06ef96f to
c36f260
Compare
|
So the latest version of geyser that supports Java 8+ is build#849. Afterwards, they require Java 16+ (GeyserMC/Geyser@bc0cfde). However, it is impossible to join a server that runs Geyser build#849, because it requires an outdated version of Minecraft: Bedrock Edition. And as we all know, we don't have a version selector for BE. So backwards compatibility with legacy versions of Geyser is useless.
I have built FastLogin 06ef96f with Java 17, then installed it on a server with Java 11 (without Geyser ofc.), and it worked without any problems. So I think that the reliable long-term solution here would be to build FastLogin with a Java 17 JDK, but still target Java 8. Is it possible to do this on the CI servers? As a short-term solution, I've force-pushed a commit that downgrades Geyser to 1.4.2 which still supports building with Java 8. The API didn't change (or I didn't notice it*), so FastLogin will work with servers that run the latest version of Geyser, even if we target an older version (at least for now...). *Fun fact: by accident, I've actually targeted Geyser 1.2.1 at ceb5ed2#diff-2292c53027067d5c27e9aa916705526918e334a0f84e379313e60e48f78f4a4e (I've overwritten that via a force-push), and everything still worked with that. Although there's not much Bukkit specific code, so there aren't many things that could have gone wrong. And core was targeting 1.4.3 |
|
The target JDK is enforced by Maven settings. However that the CI ensures is that the developer can still use an older version of the JDK. In my opinion it's fine to bump it. For developers it's easier to update than for servers. Java 17 is LTS, but since Mojang specifically uses Java 16 we should use that. |
d3eea7e to
2e669e5
Compare
|
I've reverted 2791682, and updated Github Actions to use Java 17. Does this also apply to the CodeMC CI server? |
|
Thanks for the heads up. CodeMC will now use Java 16 for FastLogin. |
277a449 to
b72b476
Compare
|
Ok, GitHub Actions is now building. I've gone with Java 16 to have the same results as with CodeMC, which is used to release new versions. |
core/src/main/java/com/github/games647/fastlogin/core/hooks/bedrock/BedrockService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/github/games647/fastlogin/core/hooks/bedrock/BedrockService.java
Outdated
Show resolved
Hide resolved
Idea: Make allowFloodgateNameConflict an alias for allowBedrockNameConflict |
b72b476 to
a2ab79c
Compare
The FloodgateService and GeyserService classes are not merged, because Geyser can work without Floodgate. Added Geyser as 'softdepends' in plugin.yml and bungee.yml to make it load before FastLogin. Also made Floodgate a soft dependency in bungee.yml.
It is possible to use Geyser without Floodgate by configuring Geyser to use auth-type= 'online' or 'offline'. In that scenario, floodgateService will be either unavailable or empty.
core/src/main/java/com/github/games647/fastlogin/core/hooks/bedrock/BedrockService.java
Outdated
Show resolved
Hide resolved
a2ab79c to
4c6a4fc
Compare
Since the code only needs to interact with Geyser, if Floodgate is not installed, and perform similar things with both, it's reasonable, to merge their code. This commit breaks premium checking with `auth-type=online` in Geyser
Shortens code and fixes an unused warning
Floodgate and Geyser specific checks can now be modified without changing JoinManagement. Added the ability to resume Java specific checks for Bedrock players. This will be neccessary for Geyser `auth-type=online` players
If AuthType == ONLINE, players will be treated as if they were Java players If AuthType == OFFLINE, name conflicts will be checked the same way it's done with Floodgate Updated config.yml to infrom about the changes.
4c6a4fc to
2c933a9
Compare
|
In the latest force-push, I have replaced this line: with this: for (GeyserSession gSess : geyser.getSessionManager().getSessions().values()) {because the first one is no longer present in Geyser. If something goes wrong, this might be the cause. |
|
Merged manually |

Summary of your change
I wanted to add support for servers with Geyser, but without Floodgate. Previously, they were all treated as Java players. Now they are not, and this gives us the ability to further configure Offline Geyser and Java name conflicts.
Notable changes in FastLogin's functionality:
Minor changes (could have been in a separate PR, but I'm lazy):
For more details, read the individual commit messages.
Related issue
Comments by @jondycz at
Additional stuff
In config.yml, allowFloodgateNameConflict should now be called allowBedrockNameConflict, however changing that would break existing configurations. It would be ideal, to create a config migrator for this. Or any other ideas?