From 78f897a490b8a1a2c800293d5680e2d703b86f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Tombor?= <28480228+Smart123s@users.noreply.github.com> Date: Sun, 21 Mar 2021 10:59:58 +0100 Subject: [PATCH] Use isPluginEnabled() in ConnectionListener.java Co-authored-by: games647 --- .../fastlogin/bukkit/listener/ConnectionListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/ConnectionListener.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/ConnectionListener.java index 838e8710..e33e716f 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/ConnectionListener.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/ConnectionListener.java @@ -51,8 +51,8 @@ public class ConnectionListener implements Listener { // having the login session from the login process BukkitLoginSession session = plugin.getSession(player.getAddress()); - if(Bukkit.getServer().getPluginManager().getPlugin("Geyser-Spigot") != null && - Bukkit.getServer().getPluginManager().getPlugin("floodgate-bukkit") != null) { + if (Bukkit.getServer().getPluginManager().isPluginEnabled("Geyser-Spigot") && + Bukkit.getServer().getPluginManager().isPluginEnabled("floodgate-bukkit")) { FloodgatePlayer floodgatePlayer = null; // check if the player is really connected through Geyser