From accd209e84fe37af30f9afd17aee6d466571d134 Mon Sep 17 00:00:00 2001 From: DNx5 Date: Sun, 20 Sep 2015 22:58:54 +0700 Subject: [PATCH] add null check for vehicle --- .../process/logout/ProcessSyncronousPlayerLogout.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 e9efd847c..96ea7e1f6 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);