diff --git a/bukkit/pom.xml b/bukkit/pom.xml
index fcef5991..3d3a0efc 100644
--- a/bukkit/pom.xml
+++ b/bukkit/pom.xml
@@ -354,6 +354,14 @@
v3.0.0
provided
true
+
+
+
+
+ *
+ *
+
+
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 cb009dfe..26217b83 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
@@ -46,7 +46,6 @@ import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
import com.velocitypowered.api.event.proxy.ProxyShutdownEvent;
import com.velocitypowered.api.plugin.Plugin;
import com.velocitypowered.api.plugin.annotation.DataDirectory;
-import com.velocitypowered.api.proxy.InboundConnection;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.ProxyServer;
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
@@ -58,6 +57,7 @@ import org.geysermc.geyser.GeyserImpl;
import org.slf4j.Logger;
import java.io.IOException;
+import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -75,7 +75,7 @@ public class FastLoginVelocity implements PlatformPlugin {
private final ProxyServer server;
private final Path dataDirectory;
private final Logger logger;
- private final ConcurrentMap session = new MapMaker().weakKeys().makeMap();
+ private final ConcurrentMap session = new MapMaker().weakKeys().makeMap();
private static final String PROXY_ID_FILE = "proxyId.txt";
private FastLoginCore core;
@@ -175,7 +175,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/listener/ConnectListener.java b/velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/ConnectListener.java
index da49a41f..4247a33c 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
@@ -119,7 +119,7 @@ public class ConnectListener {
@Subscribe
public void onGameProfileRequest(GameProfileRequestEvent event) {
if (event.isOnlineMode()) {
- LoginSession session = plugin.getSession().get(event.getConnection());
+ LoginSession session = plugin.getSession().get(event.getConnection().getRemoteAddress());
if (session == null) {
plugin.getLog().error("No active login session found for onlinemode player {}", event.getUsername());
return;
@@ -173,7 +173,7 @@ public class ConnectListener {
}
}
- VelocityLoginSession session = plugin.getSession().get(player);
+ VelocityLoginSession session = plugin.getSession().get(player.getRemoteAddress());
if (session == null) {
plugin.getLog().info("No active login session found on server connect for {}", player);
return;
@@ -193,7 +193,7 @@ public class ConnectListener {
Player player = disconnectEvent.getPlayer();
plugin.getCore().getPendingConfirms().remove(player.getUniqueId());
- plugin.getSession().remove(player);
+ plugin.getSession().remove(player.getRemoteAddress());
}
/**
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 03afd899..64041fbf 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
@@ -127,7 +127,7 @@ public class PluginMessageListener {
if (shouldPersist) {
//bukkit module successfully received and force logged in the user
//update only on success to prevent corrupt data
- VelocityLoginSession loginSession = plugin.getSession().get(forPlayer);
+ VelocityLoginSession loginSession = plugin.getSession().get(forPlayer.getRemoteAddress());
StoredProfile playerProfile = loginSession.getProfile();
loginSession.setRegistered(true);
if (!loginSession.isAlreadySaved()) {
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 878f6068..9bf97003 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
@@ -58,7 +58,7 @@ public class AsyncPremiumCheck extends JoinManagement