{ 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 abstract class JoinManagement
{ 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 abstract class JoinManagement
{
}
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 aba983a3..1c4eccf2 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 @@ public interface PlatformPlugin