From 9a6112ebd4d553039b50d1c733b752fc53e1e742 Mon Sep 17 00:00:00 2001 From: Smart123s <28480228+Smart123s@users.noreply.github.com> Date: Sat, 22 May 2021 11:42:34 +0200 Subject: [PATCH] Made ProtocolSupport check for Floodgate name conflicts Rebased on Sat May 22 11:42:34 2021 +0200 Initialize FloodgateHook in constructor This way, it won't have to be initialized whenever a player joins --- .../ProtocolSupportListener.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocolsupport/ProtocolSupportListener.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocolsupport/ProtocolSupportListener.java index 6b3826b8..24a3553c 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocolsupport/ProtocolSupportListener.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocolsupport/ProtocolSupportListener.java @@ -29,6 +29,7 @@ import com.github.games647.craftapi.UUIDAdapter; import com.github.games647.fastlogin.bukkit.BukkitLoginSession; import com.github.games647.fastlogin.bukkit.FastLoginBukkit; import com.github.games647.fastlogin.bukkit.event.BukkitFastLoginPreLoginEvent; +import com.github.games647.fastlogin.bukkit.hook.floodgate.FloodgateHook; import com.github.games647.fastlogin.core.RateLimiter; import com.github.games647.fastlogin.core.StoredProfile; import com.github.games647.fastlogin.core.shared.JoinManagement; @@ -37,11 +38,12 @@ import com.github.games647.fastlogin.core.shared.event.FastLoginPreLoginEvent; import java.net.InetSocketAddress; import java.util.Optional; -import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; +import org.geysermc.floodgate.api.player.FloodgatePlayer; + import protocolsupport.api.events.ConnectionCloseEvent; import protocolsupport.api.events.PlayerLoginStartEvent; import protocolsupport.api.events.PlayerProfileCompleteEvent; @@ -51,12 +53,14 @@ public class ProtocolSupportListener extends JoinManagement