Use isPluginEnabled() in ConnectionListener.java

Co-authored-by: games647 <games647@users.noreply.github.com>
This commit is contained in:
Péter Tomborandgames647 authored and GitHub committed 2021-03-21 10:59:58 +01:00
1 parent e1af75191e
commit 78f897a490
1 file changed
+2 -2
@@ -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