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 77ae5b28..da524f47 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 @@ -49,13 +49,13 @@ import com.velocitypowered.api.proxy.server.RegisteredServer; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import org.slf4j.Logger; -import java.io.*; +import java.io.File; +import java.io.IOException; import java.net.InetSocketAddress; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardOpenOption; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.UUID; @@ -65,14 +65,16 @@ import java.util.concurrent.ConcurrentMap; @Plugin(id = PomData.NAME, name = PomData.DISPLAY_NAME, description = PomData.DESCRIPTION, url = PomData.URL, version = PomData.VERSION, authors = {"games647", "https://github.com/games647/FastLogin/graphs/contributors"}) public class FastLoginVelocity implements PlatformPlugin { + private final ProxyServer server; private final Path dataDirectory; private final Logger logger; - private FastLoginCore core; private final ConcurrentMap session = new MapMaker().weakKeys().makeMap(); + private final String PROXY_ID_fILE = "proxyId.txt"; + + private FastLoginCore core; private AsyncScheduler scheduler; private UUID proxyId; - private final String PROXY_ID_fILE = "proxyId.txt"; @Inject public FastLoginVelocity(ProxyServer server, Logger logger, @DataDirectory Path dataDirectory) { @@ -115,7 +117,6 @@ public class FastLoginVelocity implements PlatformPlugin { @Override public void sendMessage(CommandSource receiver, String message) { receiver.sendMessage(LegacyComponentSerializer.legacyAmpersand().deserialize(message)); - } @Override @@ -132,7 +133,7 @@ public class FastLoginVelocity implements PlatformPlugin { return core; } - public ConcurrentMap getSession() { + public ConcurrentMap getSession() { return session; } diff --git a/velocity/src/main/java/com/github/games647/fastlogin/velocity/VelocityLoginSource.java b/velocity/src/main/java/com/github/games647/fastlogin/velocity/VelocityLoginSource.java index 4c1e4423..766c79f6 100644 --- a/velocity/src/main/java/com/github/games647/fastlogin/velocity/VelocityLoginSource.java +++ b/velocity/src/main/java/com/github/games647/fastlogin/velocity/VelocityLoginSource.java @@ -51,8 +51,6 @@ public class VelocityLoginSource implements LoginSource { @Override public void kick(String message) { - - if (message == null) { preLoginEvent.setResult(PreLoginEvent.PreLoginComponentResult.denied( Component.text("Kicked").color(NamedTextColor.WHITE))); diff --git a/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/ConnectListener.java b/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/ConnectListener.java index 7b5c55e5..4aa04ba6 100644 --- a/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/ConnectListener.java +++ b/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/ConnectListener.java @@ -71,7 +71,6 @@ public class ConnectListener { String username = preLoginEvent.getUsername(); plugin.getLog().info("Incoming login request for {} from {}", username, connection.getRemoteAddress()); - Runnable asyncPremiumCheck = new AsyncPremiumCheck(plugin, connection, username, continuation, preLoginEvent); plugin.getScheduler().runAsync(asyncPremiumCheck); } diff --git a/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/PluginMessageListener.java b/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/PluginMessageListener.java index bee1890c..b9df0a8a 100644 --- a/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/PluginMessageListener.java +++ b/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/PluginMessageListener.java @@ -113,7 +113,6 @@ public class PluginMessageListener { } private void onSuccessMessage(Player forPlayer) { - if (forPlayer.isOnlineMode()){ //bukkit module successfully received and force logged in the user //update only on success to prevent corrupt data