{ protected final FastLoginCore
core; protected final AuthPlugin
authHook; - private final FloodgateService floodgateService; + private final BedrockService> bedrockService; - public JoinManagement(FastLoginCore
core, AuthPlugin
authHook, FloodgateService floodService) { + public JoinManagement(FastLoginCore
core, AuthPlugin
authHook, BedrockService> bedrockService) {
this.core = core;
this.authHook = authHook;
- this.floodgateService = floodService;
+ this.bedrockService = bedrockService;
}
public void onLogin(String username, S source) {
@@ -55,11 +55,10 @@ public void onLogin(String username, S source) {
return;
}
- //check if the player is connecting through Floodgate
- if (floodgateService != null) {
- if (floodgateService.isFloodgateConnection(username)) {
- floodgateService.checkNameConflict(username, source);
- // skip flow for any floodgate player
+ //check if the player is connecting through Bedrock Edition
+ if (bedrockService != null && bedrockService.isBedrockConnection(username)) {
+ //perform Bedrock specific checks and skip Java checks, if they are not needed
+ if (bedrockService.performChecks(username, source)) {
return;
}
}
@@ -117,7 +116,7 @@ public void onLogin(String username, S source) {
}
protected boolean isValidUsername(LoginSource source, StoredProfile profile) throws Exception {
- if (floodgateService != null && floodgateService.isUsernameForbidden(profile)) {
+ if (bedrockService != null && bedrockService.isUsernameForbidden(profile)) {
core.getPlugin().getLog().info("Floodgate Prefix detected on cracked player");
source.kick("Your username contains illegal characters");
return false;
diff --git a/core/src/main/java/com/github/games647/fastlogin/core/shared/PlatformPlugin.java b/core/src/main/java/com/github/games647/fastlogin/core/shared/PlatformPlugin.java
index aba983a3c..1c4eccf21 100644
--- a/core/src/main/java/com/github/games647/fastlogin/core/shared/PlatformPlugin.java
+++ b/core/src/main/java/com/github/games647/fastlogin/core/shared/PlatformPlugin.java
@@ -26,7 +26,7 @@
package com.github.games647.fastlogin.core.shared;
import com.github.games647.fastlogin.core.AsyncScheduler;
-import com.github.games647.fastlogin.core.hooks.FloodgateService;
+import com.github.games647.fastlogin.core.hooks.bedrock.BedrockService;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import java.nio.file.Path;
@@ -54,7 +54,7 @@ default void sendMultiLineMessage(C receiver, String message) {
}
}
- FloodgateService getFloodgateService();
+ BedrockService> getBedrockService();
default ThreadFactory getThreadFactory() {
return new ThreadFactoryBuilder()
diff --git a/core/src/main/resources/config.yml b/core/src/main/resources/config.yml
index d7cbc5023..94d2b5e77 100644
--- a/core/src/main/resources/config.yml
+++ b/core/src/main/resources/config.yml
@@ -205,8 +205,8 @@ autoLogin: true
# Enabling this might lead to people gaining unauthorized access to other's accounts!
autoLoginFloodgate: false
-# This enables Floodgate players to join the server, even if autoRegister is true and there's an existing
-# Java **PREMIUM** account with the same name
+# This enables Floodgate or Offline Geyser players to join the server, even if they are using the name of an
+# existing Java **PREMIUM** account (so someone has bought Minecraft with that username)
#
# Java and Bedrock players will get different UUIDs, so their inventories, location, etc. will be different.
# However, some plugins (such as AuthMe) rely on names instead of UUIDs to identify a player which might cause issues.
@@ -219,12 +219,13 @@ autoLoginFloodgate: false
# A solution to this is to replace ProtocolLib with ProtocolSupport
#
# Possible values:
-# false: Check for Premium Java name conflicts as described in 'autoRegister'
-# Note: Linked players have the same name as their Java profile, so the Bedrock player will always conflict
+# false: Kick Bedrock players, if they are using an existing Premium Java account's name
+# Note: Linked Floodgate players have the same name as their Java profile, so the Bedrock player will always conflict
# their own Java account's name. Therefore, setting this to false will prevent any linked player from joining.
-# true: Bypass 'autoRegister's name conflict checking
-# linked: Bedrock accounts linked to a Java account will be allowed to join with conflicting names
-# !!!!!!!! WARNING: FLOODGATE SUPPORT IS AN EXPERIMENTAL FEATURE !!!!!!!!
+# true: Bypass name conflict checking.
+# linked: Floodgate accounts linked to a Java account will be allowed to join with conflicting names
+# For Offline Geyser players, 'linked' works as 'false'
+# !!!!!!!! WARNING: FLOODGATE/GEYSER SUPPORT IS AN EXPERIMENTAL FEATURE !!!!!!!!
# Enabling this might lead to people gaining unauthorized access to other's accounts!
allowFloodgateNameConflict: false
diff --git a/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java b/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java
index 68edf7a05..a96414599 100644
--- a/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java
+++ b/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java
@@ -26,7 +26,7 @@
package com.github.games647.fastlogin.velocity;
import com.github.games647.fastlogin.core.AsyncScheduler;
-import com.github.games647.fastlogin.core.hooks.FloodgateService;
+import com.github.games647.fastlogin.core.hooks.bedrock.BedrockService;
import com.github.games647.fastlogin.core.message.ChangePremiumMessage;
import com.github.games647.fastlogin.core.message.ChannelMessage;
import com.github.games647.fastlogin.core.message.SuccessMessage;
@@ -140,7 +140,7 @@ public boolean isPluginInstalled(String name) {
}
@Override
- public FloodgateService getFloodgateService() {
+ public BedrockService> getBedrockService() {
return null;
}
diff --git a/velocity/src/main/java/com/github/games647/fastlogin/velocity/task/AsyncPremiumCheck.java b/velocity/src/main/java/com/github/games647/fastlogin/velocity/task/AsyncPremiumCheck.java
index d219ef46d..3828e2b6f 100644
--- a/velocity/src/main/java/com/github/games647/fastlogin/velocity/task/AsyncPremiumCheck.java
+++ b/velocity/src/main/java/com/github/games647/fastlogin/velocity/task/AsyncPremiumCheck.java
@@ -50,7 +50,7 @@ public class AsyncPremiumCheck extends JoinManagement