premiumUUID = Optional.empty();
+- try {
+- premiumUUID = plugin.getCore().getResolver().findProfile(player.getName());
+- } catch (IOException | RateLimitException e) {
+- plugin.getLog().error(
+- "Could not check wether Floodgate Player {}'s name conflits a premium Java player's name.",
+- player.getName());
+- return;
+- }
+-
+- //stop execution if player's name is conflicting
+- if (premiumUUID.isPresent()) {
+- return;
+- }
+- }
+-
+- if (!isRegistered && autoRegisterFloodgate.equals("false")) {
- plugin.getLog().info(
- "Auto registration is disabled for Floodgate players in config.yml");
- return;
- }
--
+-
- // logging in from bedrock for a second time threw an error with UUID
- StoredProfile profile = plugin.getCore().getStorage().loadProfile(player.getName());
- if (profile == null) {
@@ -18011,7 +18051,7 @@ index 45c74a7..0000000
- }
-
- BukkitLoginSession session = new BukkitLoginSession(player.getName(), isRegistered, profile);
--
+-
- // enable auto login based on the value of 'autoLoginFloodgate' in config.yml
- session.setVerified(autoLoginFloodgate.equals("true")
- || (autoLoginFloodgate.equals("linked") && isLinked));
diff --git a/FastLogin-Patches/0002-Added-old-commits-from-forked-repo-Fastlogin.patch b/FastLogin-Patches/0002-Added-old-commits-from-forked-repo-Fastlogin.patch
index 2ec4b69..dfed89f 100644
--- a/FastLogin-Patches/0002-Added-old-commits-from-forked-repo-Fastlogin.patch
+++ b/FastLogin-Patches/0002-Added-old-commits-from-forked-repo-Fastlogin.patch
@@ -82,7 +82,7 @@ index 8a81b14..db8f269 100644
+ }
+ }
+ //end of Govindas code
-+ // LimeLogin stop
++ // LimeLogin end
}
private void setOfflineId(InitialHandler connection, String username) {
@@ -156,7 +156,7 @@ index 94500cb..b304559 100644
+ if (!playerProfile.getName().contains("-")) { playerProfile.setPremium(true); }
+ //end of Govindas code
+
-+ // LimeLogin stop
++ // LimeLogin end
playerProfile.getSaveLock().lock();
try {
if (playerProfile.isSaved()) {
@@ -170,7 +170,7 @@ index 94500cb..b304559 100644
+ if (!playerProfile.getName().contains("-")) { playerProfile.setPremium(true); }
+ //end of Govindas code
+
-+ // LimeLogin stop
++ // LimeLogin end
try (PreparedStatement saveStmt = con.prepareStatement(INSERT_PROFILE, RETURN_GENERATED_KEYS)) {
saveStmt.setString(1, uuid);
@@ -189,7 +189,7 @@ index 7efb157..b417e64 100644
+ //storage.save(playerProfile);
+ //end of Govindas comment
+
-+ // LimeLogin stop
++ // LimeLogin end
}
} catch (Exception ex) {
core.getPlugin().getLog().warn("ERROR ON FORCE LOGIN of {}", getName(player), ex);
@@ -240,11 +240,11 @@ index ec129a8..5490673 100644
+ //if (core.getConfig().get("autoRegister", false) && (authHook == null || !authHook.isRegistered(username))) {
+ //end of Govindas comment
+
-+ // LimeLogin stop
++ // LimeLogin end
+ if (core.getConfig().get("autoRegister", false) && (authHook == null)) {
+ // LimeLogin start
+ requestPremiumLogin(source, profile, username, false); //Comment: always use false to fix an error XD
-+ // LimeLogin stop
++ // LimeLogin end
return true;
}
@@ -289,7 +289,7 @@ index 0000000..007083e
+ this.cancelled = cancelled;
+ }
+}
-+// LimeLogin stop
++// LimeLogin end
\ No newline at end of file
diff --git a/core/src/main/resources/config.yml b/core/src/main/resources/config.yml
index ecb1c44..477c026 100644
diff --git a/FastLogin-Patches/0003-renamed-class-GovindasPreSecondAttemptEvent-to-LimeP.patch b/FastLogin-Patches/0003-renamed-class-GovindasPreSecondAttemptEvent-to-LimeP.patch
new file mode 100644
index 0000000..a78345c
--- /dev/null
+++ b/FastLogin-Patches/0003-renamed-class-GovindasPreSecondAttemptEvent-to-LimeP.patch
@@ -0,0 +1,55 @@
+From c9c01ec47ebcf745765f9c086083315fb791e170 Mon Sep 17 00:00:00 2001
+From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com>
+Date: Wed, 16 Jun 2021 18:43:32 +0400
+Subject: [PATCH] renamed class GovindasPreSecondAttemptEvent to
+ LimePreLoginSecondAttemptEvent
+
+
+diff --git a/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java b/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java
+index 3f05090..099df66 100644
+--- a/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java
++++ b/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java
+@@ -34,7 +34,7 @@ import com.github.games647.fastlogin.core.shared.event.FastLoginPreLoginEvent;
+
+ import java.util.Optional;
+
+-import com.github.games647.fastlogin.core.shared.event.GovindasPreSecondAttemptEvent;
++import com.github.games647.fastlogin.core.shared.event.LimePreLoginSecondAttemptEvent;
+ import net.md_5.bungee.api.ProxyServer;
+ import org.geysermc.floodgate.api.player.FloodgatePlayer;
+
+@@ -83,7 +83,7 @@ public abstract class JoinManagement {
+ } else {
+ if (core.getPendingLogin().remove(ip + username) != null && config.get("secondAttemptCracked", false)) {
+ // LimeLogin start
+- GovindasPreSecondAttemptEvent event = new GovindasPreSecondAttemptEvent(ip, username);
++ LimePreLoginSecondAttemptEvent event = new LimePreLoginSecondAttemptEvent(ip, username);
+ ProxyServer.getInstance().getPluginManager().callEvent(event);
+ if (!event.isCancelled()) {
+ core.getPlugin().getLog().info("Second attempt login -> cracked {}", username);
+diff --git a/core/src/main/java/com/github/games647/fastlogin/core/shared/event/GovindasPreSecondAttemptEvent.java b/core/src/main/java/com/github/games647/fastlogin/core/shared/event/LimePreLoginSecondAttemptEvent.java
+similarity index 78%
+rename from core/src/main/java/com/github/games647/fastlogin/core/shared/event/GovindasPreSecondAttemptEvent.java
+rename to core/src/main/java/com/github/games647/fastlogin/core/shared/event/LimePreLoginSecondAttemptEvent.java
+index 5ac3cc9..1f9807d 100644
+--- a/core/src/main/java/com/github/games647/fastlogin/core/shared/event/GovindasPreSecondAttemptEvent.java
++++ b/core/src/main/java/com/github/games647/fastlogin/core/shared/event/LimePreLoginSecondAttemptEvent.java
+@@ -4,13 +4,13 @@ package com.github.games647.fastlogin.core.shared.event;
+ import net.md_5.bungee.api.plugin.Cancellable;
+ import net.md_5.bungee.api.plugin.Event;
+
+-public class GovindasPreSecondAttemptEvent extends Event implements Cancellable {
++public class LimePreLoginSecondAttemptEvent extends Event implements Cancellable {
+
+ private final String ip;
+ private final String username;
+ private boolean cancelled;
+
+- public GovindasPreSecondAttemptEvent(String ip, String username) {
++ public LimePreLoginSecondAttemptEvent(String ip, String username) {
+ this.ip = ip;
+ this.username = username;
+ }
+--
+2.32.0.windows.1
+
diff --git a/FastLogin-Patches/0004-removed-hooks-and-commented-them-out.patch b/FastLogin-Patches/0004-removed-hooks-and-commented-them-out.patch
new file mode 100644
index 0000000..b9a9c73
--- /dev/null
+++ b/FastLogin-Patches/0004-removed-hooks-and-commented-them-out.patch
@@ -0,0 +1,74 @@
+From d85a4cd57426f484fa46c9149dd9ace7ebc77170 Mon Sep 17 00:00:00 2001
+From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com>
+Date: Tue, 15 Jun 2021 02:09:53 +0400
+Subject: [PATCH] removed hooks and commented them out
+
+
+diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/FastLoginBungee.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/FastLoginBungee.java
+index e26b271..25f1ac2 100644
+--- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/FastLoginBungee.java
++++ b/bungee/src/main/java/com/github/games647/fastlogin/bungee/FastLoginBungee.java
+@@ -25,9 +25,6 @@
+ */
+ package com.github.games647.fastlogin.bungee;
+
+-import com.github.games647.fastlogin.bungee.hook.BungeeAuthHook;
+-import com.github.games647.fastlogin.bungee.hook.BungeeCordAuthenticatorBungeeHook;
+-import com.github.games647.fastlogin.bungee.hook.SodionAuthHook;
+ import com.github.games647.fastlogin.bungee.listener.ConnectListener;
+ import com.github.games647.fastlogin.bungee.listener.PluginMessageListener;
+ import com.github.games647.fastlogin.core.AsyncScheduler;
+@@ -50,7 +47,6 @@ import java.util.List;
+ import java.util.concurrent.ConcurrentMap;
+ import java.util.concurrent.ThreadFactory;
+
+-import net.md_5.bungee.BungeeServerInfo;
+ import net.md_5.bungee.api.CommandSender;
+ import net.md_5.bungee.api.chat.TextComponent;
+ import net.md_5.bungee.api.connection.PendingConnection;
+@@ -102,8 +98,9 @@ public class FastLoginBungee extends Plugin implements PlatformPlugin>> hooks = Arrays.asList(
+- BungeeAuthHook.class, BungeeCordAuthenticatorBungeeHook.class, SodionAuthHook.class);
++ try {
++ List>> hooks = Arrays.asList();
+
+ for (Class extends AuthPlugin> clazz : hooks) {
+ String pluginName = clazz.getSimpleName();
+@@ -141,7 +139,8 @@ public class FastLoginBungee extends Plugin implements PlatformPlugin>>>>>> 654e137 (related to main)
++ // LimeLogin end
+
+ public void sendPluginMessage(Server server, ChannelMessage message) {
+ if (server != null) {
+--
+2.32.0.windows.1
+
diff --git a/FastLogin-Patches/0005-deleted-unwanted-classes.patch b/FastLogin-Patches/0005-deleted-unwanted-classes.patch
new file mode 100644
index 0000000..9d0c740
--- /dev/null
+++ b/FastLogin-Patches/0005-deleted-unwanted-classes.patch
@@ -0,0 +1,263 @@
+From 151180bd97484b1dfc4342c73d0a73dc33669a2f Mon Sep 17 00:00:00 2001
+From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com>
+Date: Tue, 15 Jun 2021 02:10:12 +0400
+Subject: [PATCH] deleted unwanted classes
+
+
+diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/hook/BungeeAuthHook.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/hook/BungeeAuthHook.java
+deleted file mode 100644
+index abddb17..0000000
+--- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/hook/BungeeAuthHook.java
++++ /dev/null
+@@ -1,65 +0,0 @@
+-/*
+- * SPDX-License-Identifier: MIT
+- *
+- * The MIT License (MIT)
+- *
+- * Copyright (c) 2015-2021
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a copy
+- * of this software and associated documentation files (the "Software"), to deal
+- * in the Software without restriction, including without limitation the rights
+- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+- * copies of the Software, and to permit persons to whom the Software is
+- * furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in all
+- * copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+- * SOFTWARE.
+- */
+-package com.github.games647.fastlogin.bungee.hook;
+-
+-import com.github.games647.fastlogin.bungee.FastLoginBungee;
+-import com.github.games647.fastlogin.core.hooks.AuthPlugin;
+-
+-import me.vik1395.BungeeAuth.Main;
+-import me.vik1395.BungeeAuthAPI.RequestHandler;
+-
+-import net.md_5.bungee.api.connection.ProxiedPlayer;
+-
+-/**
+- * GitHub: https://github.com/vik1395/BungeeAuth-Minecraft
+- *
+- * Project page:
+- *
+- * Spigot: https://www.spigotmc.org/resources/bungeeauth.493/
+- */
+-public class BungeeAuthHook implements AuthPlugin {
+-
+- private final RequestHandler requestHandler = new RequestHandler();
+-
+- public BungeeAuthHook(FastLoginBungee plugin) {
+- }
+-
+- @Override
+- public boolean forceLogin(ProxiedPlayer player) {
+- String playerName = player.getName();
+- return Main.plonline.contains(playerName) || requestHandler.forceLogin(playerName);
+- }
+-
+- @Override
+- public boolean isRegistered(String playerName) {
+- return requestHandler.isRegistered(playerName);
+- }
+-
+- @Override
+- public boolean forceRegister(ProxiedPlayer player, String password) {
+- return requestHandler.forceRegister(player, password);
+- }
+-}
+diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/hook/BungeeCordAuthenticatorBungeeHook.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/hook/BungeeCordAuthenticatorBungeeHook.java
+deleted file mode 100644
+index beb56d9..0000000
+--- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/hook/BungeeCordAuthenticatorBungeeHook.java
++++ /dev/null
+@@ -1,93 +0,0 @@
+-/*
+- * SPDX-License-Identifier: MIT
+- *
+- * The MIT License (MIT)
+- *
+- * Copyright (c) 2015-2021
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a copy
+- * of this software and associated documentation files (the "Software"), to deal
+- * in the Software without restriction, including without limitation the rights
+- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+- * copies of the Software, and to permit persons to whom the Software is
+- * furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in all
+- * copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+- * SOFTWARE.
+- */
+-package com.github.games647.fastlogin.bungee.hook;
+-
+-import java.sql.SQLException;
+-
+-import com.github.games647.fastlogin.bungee.FastLoginBungee;
+-import com.github.games647.fastlogin.core.hooks.AuthPlugin;
+-
+-import de.xxschrandxx.bca.bungee.BungeeCordAuthenticatorBungee;
+-import de.xxschrandxx.bca.bungee.api.BungeeCordAuthenticatorBungeeAPI;
+-
+-import net.md_5.bungee.api.connection.ProxiedPlayer;
+-
+-/**
+- * GitHub:
+- * https://github.com/xXSchrandXx/SpigotPlugins/tree/master/BungeeCordAuthenticator
+- *
+- * Project page:
+- *
+- * Spigot: https://www.spigotmc.org/resources/bungeecordauthenticator.87669/
+- */
+-public class BungeeCordAuthenticatorBungeeHook implements AuthPlugin {
+-
+- public final BungeeCordAuthenticatorBungeeAPI api;
+-
+- public BungeeCordAuthenticatorBungeeHook(FastLoginBungee plugin) {
+- api = ((BungeeCordAuthenticatorBungee) plugin.getProxy().getPluginManager()
+- .getPlugin("BungeeCordAuthenticatorBungee")).getAPI();
+- plugin.getLog().info("BungeeCordAuthenticatorHook | Hooked successful!");
+- }
+-
+- @Override
+- public boolean forceLogin(ProxiedPlayer player) {
+- if (api.isAuthenticated(player)) {
+- return true;
+- } else {
+- try {
+- api.setAuthenticated(player);
+- }
+- catch (SQLException e) {
+- e.printStackTrace();
+- return false;
+- }
+- return true;
+- }
+- }
+-
+- @Override
+- public boolean isRegistered(String playerName) {
+- try {
+- return api.getSQL().checkPlayerEntry(playerName);
+- }
+- catch (SQLException e) {
+- e.printStackTrace();
+- return false;
+- }
+- }
+-
+- @Override
+- public boolean forceRegister(ProxiedPlayer player, String password) {
+- try {
+- return api.createPlayerEntry(player, password);
+- }
+- catch (SQLException e) {
+- e.printStackTrace();
+- return false;
+- }
+- }
+-}
+diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/hook/SodionAuthHook.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/hook/SodionAuthHook.java
+deleted file mode 100644
+index c12f2b0..0000000
+--- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/hook/SodionAuthHook.java
++++ /dev/null
+@@ -1,78 +0,0 @@
+-/*
+- * SPDX-License-Identifier: MIT
+- *
+- * The MIT License (MIT)
+- *
+- * Copyright (c) 2015-2021
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a copy
+- * of this software and associated documentation files (the "Software"), to deal
+- * in the Software without restriction, including without limitation the rights
+- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+- * copies of the Software, and to permit persons to whom the Software is
+- * furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in all
+- * copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+- * SOFTWARE.
+- */
+-package com.github.games647.fastlogin.bungee.hook;
+-
+-import com.github.games647.fastlogin.bungee.FastLoginBungee;
+-import com.github.games647.fastlogin.core.hooks.AuthPlugin;
+-import net.md_5.bungee.api.connection.ProxiedPlayer;
+-import red.mohist.sodionauth.bungee.implementation.BungeePlayer;
+-import red.mohist.sodionauth.core.SodionAuthApi;
+-import red.mohist.sodionauth.core.exception.AuthenticatedException;
+-
+-/**
+- * GitHub: https://github.com/Mohist-Community/SodionAuth
+- *
+- * Project page: https://gitea.e-loli.com/SodionAuth/SodionAuth
+- *
+- * Bukkit: Unknown
+- *
+- * Spigot: https://www.spigotmc.org/resources/sodionauth.76944/
+- */
+-public class SodionAuthHook implements AuthPlugin {
+-
+- private final FastLoginBungee plugin;
+-
+- public SodionAuthHook(FastLoginBungee plugin) {
+- this.plugin = plugin;
+- }
+-
+- @Override
+- public boolean forceLogin(ProxiedPlayer player) {
+- try {
+- SodionAuthApi.login(new BungeePlayer(player));
+- } catch (AuthenticatedException e) {
+- plugin.getLog().warn(ALREADY_AUTHENTICATED, player);
+- return false;
+- }
+- return true;
+- }
+-
+- @Override
+- public boolean forceRegister(ProxiedPlayer player, String password) {
+- try{
+- return SodionAuthApi.register(new BungeePlayer(player), password);
+- } catch (UnsupportedOperationException e){
+- plugin.getLog().warn("Currently SodionAuth is not accepting forceRegister, " +
+- "It may be caused by unsupported AuthBackend");
+- return false;
+- }
+- }
+-
+- @Override
+- public boolean isRegistered(String playerName) {
+- return SodionAuthApi.isRegistered(playerName);
+- }
+-}
+--
+2.32.0.windows.1
+
diff --git a/FastLogin-Patches/0006-Removing-all-Auth-related-stuff.patch b/FastLogin-Patches/0006-Removing-all-Auth-related-stuff.patch
new file mode 100644
index 0000000..1b875c5
--- /dev/null
+++ b/FastLogin-Patches/0006-Removing-all-Auth-related-stuff.patch
@@ -0,0 +1,562 @@
+From 4975802f5fcea2ef9cfa06df8b9a0939961ff935 Mon Sep 17 00:00:00 2001
+From: mohammed jasem alaajel <34905970+ham1255@users.noreply.github.com>
+Date: Tue, 15 Jun 2021 02:28:50 +0400
+Subject: [PATCH] Removing all Auth related stuff
+
+
+diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/FastLoginBungee.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/FastLoginBungee.java
+index 25f1ac2..ec6f74a 100644
+--- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/FastLoginBungee.java
++++ b/bungee/src/main/java/com/github/games647/fastlogin/bungee/FastLoginBungee.java
+@@ -29,7 +29,6 @@ import com.github.games647.fastlogin.bungee.listener.ConnectListener;
+ import com.github.games647.fastlogin.bungee.listener.PluginMessageListener;
+ import com.github.games647.fastlogin.core.AsyncScheduler;
+ import com.github.games647.fastlogin.core.CommonUtil;
+-import com.github.games647.fastlogin.core.hooks.AuthPlugin;
+ import com.github.games647.fastlogin.core.message.ChangePremiumMessage;
+ import com.github.games647.fastlogin.core.message.ChannelMessage;
+ import com.github.games647.fastlogin.core.message.NamespaceKey;
+@@ -42,8 +41,6 @@ import com.google.common.io.ByteStreams;
+ import com.google.common.util.concurrent.ThreadFactoryBuilder;
+
+ import java.nio.file.Path;
+-import java.util.Arrays;
+-import java.util.List;
+ import java.util.concurrent.ConcurrentMap;
+ import java.util.concurrent.ThreadFactory;
+
+diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java
+index db8f269..07df30a 100644
+--- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java
++++ b/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java
+@@ -32,7 +32,6 @@ import com.github.games647.fastlogin.bungee.hook.floodgate.FloodgateHook;
+ import com.github.games647.fastlogin.bungee.hook.floodgate.FloodgateV1Hook;
+ import com.github.games647.fastlogin.bungee.hook.floodgate.FloodgateV2Hook;
+ import com.github.games647.fastlogin.bungee.task.AsyncPremiumCheck;
+-import com.github.games647.fastlogin.bungee.task.ForceLoginTask;
+ import com.github.games647.fastlogin.core.RateLimiter;
+ import com.github.games647.fastlogin.core.StoredProfile;
+ import com.github.games647.fastlogin.core.shared.LoginSession;
+@@ -249,8 +248,12 @@ public class ConnectListener implements Listener {
+ // delay sending force command, because Paper will process the login event asynchronously
+ // In this case it means that the force command (plugin message) is already received and processed while
+ // player is still in the login phase and reported to be offline.
+- Runnable loginTask = new ForceLoginTask(plugin.getCore(), player, server, session);
+- plugin.getScheduler().runAsync(loginTask);
++
++ // LimeLogin start
++ //Disabled...
++ //Runnable loginTask = new ForceLoginTask(plugin.getCore(), player, server, session);
++ //plugin.getScheduler().runAsync(loginTask);
++ // LimeLogin end
+ }
+
+ @EventHandler
+diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/task/AsyncPremiumCheck.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/task/AsyncPremiumCheck.java
+index 410b1e4..0136f09 100644
+--- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/task/AsyncPremiumCheck.java
++++ b/bungee/src/main/java/com/github/games647/fastlogin/bungee/task/AsyncPremiumCheck.java
+@@ -49,8 +49,9 @@ public class AsyncPremiumCheck extends JoinManagement>>>>>> 654e137 (related to main)
+ this.plugin = plugin;
+ this.preLoginEvent = preLoginEvent;
+ this.connection = connection;
+diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/task/ForceLoginTask.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/task/ForceLoginTask.java
+deleted file mode 100644
+index 0a7f862..0000000
+--- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/task/ForceLoginTask.java
++++ /dev/null
+@@ -1,121 +0,0 @@
+-/*
+- * SPDX-License-Identifier: MIT
+- *
+- * The MIT License (MIT)
+- *
+- * Copyright (c) 2015-2021
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a copy
+- * of this software and associated documentation files (the "Software"), to deal
+- * in the Software without restriction, including without limitation the rights
+- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+- * copies of the Software, and to permit persons to whom the Software is
+- * furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in all
+- * copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+- * SOFTWARE.
+- */
+-package com.github.games647.fastlogin.bungee.task;
+-
+-import com.github.games647.fastlogin.bungee.BungeeLoginSession;
+-import com.github.games647.fastlogin.bungee.FastLoginBungee;
+-import com.github.games647.fastlogin.bungee.event.BungeeFastLoginAutoLoginEvent;
+-import com.github.games647.fastlogin.core.StoredProfile;
+-import com.github.games647.fastlogin.core.message.ChannelMessage;
+-import com.github.games647.fastlogin.core.message.LoginActionMessage;
+-import com.github.games647.fastlogin.core.message.LoginActionMessage.Type;
+-import com.github.games647.fastlogin.core.shared.FastLoginCore;
+-import com.github.games647.fastlogin.core.shared.ForceLoginManagement;
+-import com.github.games647.fastlogin.core.shared.LoginSession;
+-import com.github.games647.fastlogin.core.shared.event.FastLoginAutoLoginEvent;
+-
+-import java.util.UUID;
+-
+-import net.md_5.bungee.api.CommandSender;
+-import net.md_5.bungee.api.ProxyServer;
+-import net.md_5.bungee.api.connection.ProxiedPlayer;
+-import net.md_5.bungee.api.connection.Server;
+-
+-public class ForceLoginTask
+- extends ForceLoginManagement {
+-
+- private final Server server;
+-
+- public ForceLoginTask(FastLoginCore core,
+- ProxiedPlayer player, Server server, BungeeLoginSession session) {
+- super(core, player, session);
+-
+- this.server = server;
+- }
+-
+- @Override
+- public void run() {
+- if (session == null) {
+- return;
+- }
+-
+- super.run();
+-
+- if (!isOnlineMode()) {
+- session.setAlreadySaved(true);
+- }
+- }
+-
+- @Override
+- public boolean forceLogin(ProxiedPlayer player) {
+- if (session.isAlreadyLogged()) {
+- return true;
+- }
+-
+- session.setAlreadyLogged(true);
+- return super.forceLogin(player);
+- }
+-
+- @Override
+- public FastLoginAutoLoginEvent callFastLoginAutoLoginEvent(LoginSession session, StoredProfile profile) {
+- return core.getPlugin().getProxy().getPluginManager()
+- .callEvent(new BungeeFastLoginAutoLoginEvent(session, profile));
+- }
+-
+- @Override
+- public boolean forceRegister(ProxiedPlayer player) {
+- return session.isAlreadyLogged() || super.forceRegister(player);
+- }
+-
+- @Override
+- public void onForceActionSuccess(LoginSession session) {
+- //sub channel name
+- Type type = Type.LOGIN;
+- if (session.needsRegistration()) {
+- type = Type.REGISTER;
+- }
+-
+- UUID proxyId = UUID.fromString(ProxyServer.getInstance().getConfig().getUuid());
+- ChannelMessage loginMessage = new LoginActionMessage(type, player.getName(), proxyId);
+-
+- core.getPlugin().sendPluginMessage(server, loginMessage);
+- }
+-
+- @Override
+- public String getName(ProxiedPlayer player) {
+- return player.getName();
+- }
+-
+- @Override
+- public boolean isOnline(ProxiedPlayer player) {
+- return player.isConnected();
+- }
+-
+- @Override
+- public boolean isOnlineMode() {
+- return player.getPendingConnection().isOnlineMode();
+- }
+-}
+diff --git a/core/src/main/java/com/github/games647/fastlogin/core/hooks/AuthPlugin.java b/core/src/main/java/com/github/games647/fastlogin/core/hooks/AuthPlugin.java
+deleted file mode 100644
+index 1a614ba..0000000
+--- a/core/src/main/java/com/github/games647/fastlogin/core/hooks/AuthPlugin.java
++++ /dev/null
+@@ -1,87 +0,0 @@
+-/*
+- * SPDX-License-Identifier: MIT
+- *
+- * The MIT License (MIT)
+- *
+- * Copyright (c) 2015-2021
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a copy
+- * of this software and associated documentation files (the "Software"), to deal
+- * in the Software without restriction, including without limitation the rights
+- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+- * copies of the Software, and to permit persons to whom the Software is
+- * furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in all
+- * copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+- * SOFTWARE.
+- */
+-package com.github.games647.fastlogin.core.hooks;
+-
+-/**
+- * Represents a supporting authentication plugin in BungeeCord and Bukkit/Spigot/... servers
+- *
+- * @param either {@link org.bukkit.entity.Player} for Bukkit or {@link net.md_5.bungee.api.connection.ProxiedPlayer}
+- * for BungeeCord
+- */
+-public interface AuthPlugin
{
+-
+- String ALREADY_AUTHENTICATED = "Player {} is already authenticated. Cancelling force login.";
+-
+- /**
+- * Login the premium (paid account) player after the player joined successfully the server.
+- *
+- * This operation will be performed async while the player successfully
+- * joined the server.
+- *
+- * @param player the player that needs to be logged in
+- * @return if the operation was successful
+- */
+- boolean forceLogin(P player);
+-
+- /**
+- * Forces a register in order to protect the paid account.
+- *
+- * This operation will be performed async while the player successfully
+- * joined the server.
+- *
+- * After a successful registration the player should be logged
+- * in too.
+- *
+- * The method will be called only for premium accounts.
+- * So it's recommended to set additionally premium property
+- * if possible.
+- *
+- * Background: If we don't register an account, cracked players
+- * could steal the unregistered account from the paid
+- * player account
+- *
+- * @param player the premium account
+- * @param password a strong random generated password
+- * @return if the operation was successful
+- */
+- boolean forceRegister(P player, String password);
+-
+- /**
+- * Checks whether an account exists for this player name.
+- *
+- * This check should check if a cracked player account exists
+- * so we can be sure the premium player doesn't steal the account
+- * of that player.
+- *
+- * This operation will be performed async while the player is
+- * connecting.
+- *
+- * @param playerName player name
+- * @return if the player has an account
+- * @throws Exception if an error occurred
+- */
+- boolean isRegistered(String playerName) throws Exception;
+-}
+diff --git a/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java b/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java
+index ec3f924..90c9add 100644
+--- a/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java
++++ b/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java
+@@ -30,7 +30,6 @@ import com.github.games647.craftapi.resolver.http.RotatingProxySelector;
+ import com.github.games647.fastlogin.core.AuthStorage;
+ import com.github.games647.fastlogin.core.CommonUtil;
+ import com.github.games647.fastlogin.core.RateLimiter;
+-import com.github.games647.fastlogin.core.hooks.AuthPlugin;
+ import com.github.games647.fastlogin.core.hooks.DefaultPasswordGenerator;
+ import com.github.games647.fastlogin.core.hooks.PasswordGenerator;
+ import com.google.common.net.HostAndPort;
+@@ -85,8 +84,9 @@ public class FastLoginCore
> {
+ private AuthStorage storage;
+ private RateLimiter rateLimiter;
+ private PasswordGenerator
passwordGenerator = new DefaultPasswordGenerator<>();
+- private AuthPlugin
authPlugin;
+-
++ // LimeLogin start
++ //private AuthPlugin
authPlugin;
++ // LimeLogin end
+<<<<<<< HEAD
+
+=======
+>>>>>>> 654e137 (related to main)
+ public FastLoginCore(T plugin) {
+ this.plugin = plugin;
+ }
+@@ -251,17 +251,25 @@ public class FastLoginCore
> {
+ return pendingConfirms;
+ }
+
++ // LimeLogin start
++ /*
+ public AuthPlugin
getAuthPluginHook() {
+ return authPlugin;
+ }
++ */
++ // LimeLogin end
+<<<<<<< HEAD
+
+
+=======
+>>>>>>> 654e137 (related to main)
+
+ public RateLimiter getRateLimiter() {
+ return rateLimiter;
+ }
+
++ // LimeLogin start
++ /*
+ public void setAuthPluginHook(AuthPlugin
authPlugin) {
+ this.authPlugin = authPlugin;
+ }
++ */
++ // LimeLogin end
+
+ public void saveDefaultFile(String fileName) {
+ Path dataFolder = plugin.getPluginFolder();
+diff --git a/core/src/main/java/com/github/games647/fastlogin/core/shared/ForceLoginManagement.java b/core/src/main/java/com/github/games647/fastlogin/core/shared/ForceLoginManagement.java
+deleted file mode 100644
+index b417e64..0000000
+--- a/core/src/main/java/com/github/games647/fastlogin/core/shared/ForceLoginManagement.java
++++ /dev/null
+@@ -1,143 +0,0 @@
+-/*
+- * SPDX-License-Identifier: MIT
+- *
+- * The MIT License (MIT)
+- *
+- * Copyright (c) 2015-2021
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a copy
+- * of this software and associated documentation files (the "Software"), to deal
+- * in the Software without restriction, including without limitation the rights
+- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+- * copies of the Software, and to permit persons to whom the Software is
+- * furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in all
+- * copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+- * SOFTWARE.
+- */
+-package com.github.games647.fastlogin.core.shared;
+-
+-import com.github.games647.fastlogin.core.AuthStorage;
+-import com.github.games647.fastlogin.core.StoredProfile;
+-import com.github.games647.fastlogin.core.hooks.AuthPlugin;
+-import com.github.games647.fastlogin.core.shared.event.FastLoginAutoLoginEvent;
+-
+-public abstract class ForceLoginManagement>
+- implements Runnable {
+-
+- protected final FastLoginCore
core;
+- protected final P player;
+- protected final L session;
+-
+- public ForceLoginManagement(FastLoginCore
core, P player, L session) {
+- this.core = core;
+- this.player = player;
+- this.session = session;
+- }
+-
+- @Override
+- public void run() {
+- if (!isOnline(player)) {
+- core.getPlugin().getLog().info("Player {} disconnected", player);
+- return;
+- }
+-
+- if (session == null) {
+- core.getPlugin().getLog().info("No valid session found for {}", player);
+- return;
+- }
+-
+- AuthStorage storage = core.getStorage();
+- StoredProfile playerProfile = session.getProfile();
+- try {
+- if (isOnlineMode()) {
+- //premium player
+- AuthPlugin
authPlugin = core.getAuthPluginHook();
+- if (authPlugin == null) {
+- //maybe only bungeecord plugin
+- onForceActionSuccess(session);
+- } else {
+- boolean success = true;
+- String playerName = getName(player);
+- if (core.getConfig().get("autoLogin", true)) {
+- if (session.needsRegistration()
+- || (core.getConfig().get("auto-register-unknown", false)
+- && !authPlugin.isRegistered(playerName))) {
+- success = forceRegister(player);
+- } else if (!callFastLoginAutoLoginEvent(session, playerProfile).isCancelled()) {
+- success = forceLogin(player);
+- }
+- }
+-
+- if (success) {
+- //update only on success to prevent corrupt data
+- if (playerProfile != null) {
+- playerProfile.setId(session.getUuid());
+- playerProfile.setPremium(true);
+- storage.save(playerProfile);
+- }
+-
+- onForceActionSuccess(session);
+- }
+- }
+- } else if (playerProfile != null) {
+- //cracked player
+- playerProfile.setId(null);
+- playerProfile.setPremium(false);
+- // LimeLogin start
+-
+- //Govindas comment - don't save cracked player profiles, I found it to be useless
+- //storage.save(playerProfile);
+- //end of Govindas comment
+-
+- // LimeLogin end
+- }
+- } catch (Exception ex) {
+- core.getPlugin().getLog().warn("ERROR ON FORCE LOGIN of {}", getName(player), ex);
+- }
+- }
+-
+- public boolean forceRegister(P player) {
+- core.getPlugin().getLog().info("Register player {}", getName(player));
+-
+- String generatedPassword = core.getPasswordGenerator().getRandomPassword(player);
+- boolean success = core.getAuthPluginHook().forceRegister(player, generatedPassword);
+-
+- String message = core.getMessage("auto-register");
+- if (success && message != null) {
+- message = message.replace("%password", generatedPassword);
+- core.getPlugin().sendMessage(player, message);
+- }
+-
+- return success;
+- }
+-
+- public boolean forceLogin(P player) {
+- core.getPlugin().getLog().info("Logging player {} in", getName(player));
+-
+- boolean success = core.getAuthPluginHook().forceLogin(player);
+- if (success) {
+- core.sendLocaleMessage("auto-login", player);
+- }
+-
+- return success;
+- }
+-
+- public abstract FastLoginAutoLoginEvent callFastLoginAutoLoginEvent(LoginSession session, StoredProfile profile);
+-
+- public abstract void onForceActionSuccess(LoginSession session);
+-
+- public abstract String getName(P player);
+-
+- public abstract boolean isOnline(P player);
+-
+- public abstract boolean isOnlineMode();
+-}
+diff --git a/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java b/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java
+index 5490673..dabe324 100644
+--- a/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java
++++ b/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java
+@@ -28,7 +28,6 @@ package com.github.games647.fastlogin.core.shared;
+ import com.github.games647.craftapi.model.Profile;
+ import com.github.games647.craftapi.resolver.RateLimitException;
+ import com.github.games647.fastlogin.core.StoredProfile;
+-import com.github.games647.fastlogin.core.hooks.AuthPlugin;
+ import com.github.games647.fastlogin.core.hooks.FloodgateHook;
+ import com.github.games647.fastlogin.core.shared.event.FastLoginPreLoginEvent;
+
+@@ -43,14 +42,18 @@ import net.md_5.bungee.config.Configuration;
+ public abstract class JoinManagement
{
+
+ protected final FastLoginCore
core;
+- protected final AuthPlugin
authHook;
++ // LimeLogin start
++ //protected final AuthPlugin
authHook;
++ // LimeLogin end
+ private final FloodgateHook
floodgateHook;
+
+- public JoinManagement(FastLoginCore
core, AuthPlugin
authHook) {
++ // LimeLogin start
++ public JoinManagement(FastLoginCore
core) {
+ this.core = core;
+- this.authHook = authHook;
+ this.floodgateHook = new FloodgateHook<>(core);
+ }
+<<<<<<< HEAD
+
+=======
+>>>>>>> 654e137 (related to main)
++ // LimeLogin end
++
+
+ public void onLogin(String username, S source) {
+ core.getPlugin().getLog().info("Handling player {}", username);
+@@ -130,7 +133,7 @@ public abstract class JoinManagement
{
+ //end of Govindas comment
+<<<<<<< HEAD
+
+ // LimeLogin end
+
+=======
+
+ // LimeLogin end
+>>>>>>> 654e137 (related to main)
+- if (core.getConfig().get("autoRegister", false) && (authHook == null)) {
++ if (core.getConfig().get("autoRegister", false)) {
+ // LimeLogin start
+ requestPremiumLogin(source, profile, username, false); //Comment: always use false to fix an error XD
+ // LimeLogin end
+<<<<<<< HEAD
+
+=======
+>>>>>>> 654e137 (related to main)
+--
+2.32.0.windows.1
+