Skip to content

Commit 5858bfb

Browse files
committed
Add Floodgate name conflict check to ProtocolSupport
1 parent b0ef1a5 commit 5858bfb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocolsupport/ProtocolSupportListener.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import java.net.InetSocketAddress;
3838
import java.util.Optional;
3939

40+
import org.bukkit.Bukkit;
4041
import org.bukkit.command.CommandSender;
4142
import org.bukkit.entity.Player;
4243
import org.bukkit.event.EventHandler;
@@ -75,7 +76,9 @@ public void onLoginStart(PlayerLoginStartEvent loginStartEvent) {
7576
//remove old data every time on a new login in order to keep the session only for one person
7677
plugin.removeSession(address);
7778

78-
super.onLogin(username, new ProtocolLoginSource(loginStartEvent), false);
79+
boolean floodgateAvailable = Bukkit.getServer().getPluginManager().isPluginEnabled("floodgate");
80+
81+
super.onLogin(username, new ProtocolLoginSource(loginStartEvent), floodgateAvailable);
7982
}
8083

8184
@EventHandler

0 commit comments

Comments
 (0)