diff --git a/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerPreLoginListener.java b/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerPreLoginListener.java index c09d991..fed391b 100644 --- a/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerPreLoginListener.java +++ b/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerPreLoginListener.java @@ -2,8 +2,8 @@ package de.cliffbreak.varo.listeners; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; -import org.bukkit.event.player.AsyncPlayerPreLoginEvent; -import org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result; +import org.bukkit.event.player.PlayerLoginEvent; +import org.bukkit.event.player.PlayerLoginEvent.Result; import de.cliffbreak.varo.Varo; @@ -16,8 +16,9 @@ public class PlayerPreLoginListener implements Listener { } @EventHandler - public void onPlayerPreLogin(final AsyncPlayerPreLoginEvent e) { - if (plugin.banUtils.isBanned(e.getPlayerProfile().getId())) + public void onPlayerPreLogin(final PlayerLoginEvent e) { + if (plugin.banUtils.isBanned(e.getPlayer().getUniqueId())) { e.disallow(Result.KICK_BANNED, "§4Du bist gestorben.\n \n§cDamit bist du aus §eVaro§c ausgeschieden."); + } } } \ No newline at end of file