Use isPluginEnabled() in ConnectionListener.java

Co-authored-by: games647 <games647@users.noreply.github.com>
This commit is contained in:
Péter Tombor
2021-03-21 10:59:58 +01:00
committed by GitHub
parent e1af75191e
commit 78f897a490

View File

@ -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