diff --git a/src/main/java/fr/xephi/authme/process/logout/ProcessSyncronousPlayerLogout.java b/src/main/java/fr/xephi/authme/process/logout/ProcessSyncronousPlayerLogout.java index e9efd847..96ea7e1f 100644 --- a/src/main/java/fr/xephi/authme/process/logout/ProcessSyncronousPlayerLogout.java +++ b/src/main/java/fr/xephi/authme/process/logout/ProcessSyncronousPlayerLogout.java @@ -43,11 +43,8 @@ public class ProcessSyncronousPlayerLogout implements Runnable { } BukkitTask msgT = sched.runTaskAsynchronously(plugin, new MessageTask(plugin, name, m.send("login_msg"), interval)); LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(msgT); - try { - if (player.isInsideVehicle()) - player.getVehicle().eject(); - } catch (NullPointerException npe) { - } + if (player.isInsideVehicle() && player.getVehicle() != null) + player.getVehicle().eject(); if (Settings.applyBlindEffect) player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, Settings.getRegistrationTimeout * 20, 2)); player.setOp(false);