From abd18fae7dbf0b539301ef08e5818b43b356c5d4 Mon Sep 17 00:00:00 2001 From: Zrips Date: Thu, 4 Aug 2016 17:35:26 +0300 Subject: [PATCH] Wrong access for jobsPlayer --- com/gamingmesh/jobs/Jobs.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/com/gamingmesh/jobs/Jobs.java b/com/gamingmesh/jobs/Jobs.java index 1ba1eea7..87fee3ba 100644 --- a/com/gamingmesh/jobs/Jobs.java +++ b/com/gamingmesh/jobs/Jobs.java @@ -434,7 +434,7 @@ public class Jobs { reload(); // add all online players - if (!Jobs.getGCManager().MultiServerCompatability()) { + if (!Jobs.getGCManager().MultiServerCompatability() && Jobs.getGCManager().PreLoadUse) { int i = 0; long time = System.currentTimeMillis(); for (OfflinePlayer offline : Bukkit.getServer().getOfflinePlayers()) { @@ -448,8 +448,10 @@ public class Jobs { if (dif >= 7) continue; - JobsPlayer jPlayer = JobsPlayer.loadFromDao(Jobs.getJobsDAO(), offline); - JobsPlayer.loadLogFromDao(jPlayer); + JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayerOffline(offline); + if (jPlayer == null) + continue; + Jobs.getJobsDAO().loadLog(jPlayer); Jobs.getPlayerManager().getPlayersCache().put(offline.getName().toLowerCase(), jPlayer); } catch (Exception e) { }