Idk why the player becomes null, maybe the isOnline check is enought
This commit is contained in:
Gabriele C 2016-05-14 00:25:24 +02:00
parent c748501345
commit 9e688b410d

View File

@ -444,7 +444,10 @@ public class AuthMePlayerListener implements Listener {
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
@Override
public void run() {
player.closeInventory();
// Fix NPE, idk how this is possible -sgdc3
if(player != null && player.isOnline()) {
player.closeInventory();
}
}
}, 1);
}