diff --git a/com/gamingmesh/jobs/Jobs.java b/com/gamingmesh/jobs/Jobs.java index 0b130ffe..abe68565 100644 --- a/com/gamingmesh/jobs/Jobs.java +++ b/com/gamingmesh/jobs/Jobs.java @@ -972,10 +972,10 @@ public class Jobs extends JavaPlugin { continue; try { - if (expAmount != 0D) - if (GconfigManager.BossBarEnabled && GconfigManager.BossBarShowOnEachAction) { + if (expAmount != 0D && GconfigManager.BossBarEnabled) + if (GconfigManager.BossBarShowOnEachAction) { Jobs.getBBManager().ShowJobProgression(jPlayer, prog); - } else if (GconfigManager.BossBarEnabled && !GconfigManager.BossBarShowOnEachAction) + } else jPlayer.getUpdateBossBarFor().add(prog.getJob().getName()); } catch (Exception e) { Bukkit.getConsoleSender().sendMessage("[Jobs] Some issues with boss bar feature accured, try disabling it to avoid it."); diff --git a/com/gamingmesh/jobs/PlayerManager.java b/com/gamingmesh/jobs/PlayerManager.java index dd8f6db8..87744c08 100644 --- a/com/gamingmesh/jobs/PlayerManager.java +++ b/com/gamingmesh/jobs/PlayerManager.java @@ -663,7 +663,7 @@ public class PlayerManager { continue main; } - return oneItem.getBoost().clone(); + return oneItem.getBoost(); } return bonus; diff --git a/com/gamingmesh/jobs/container/Job.java b/com/gamingmesh/jobs/container/Job.java index 7f67d679..a6157e56 100644 --- a/com/gamingmesh/jobs/container/Job.java +++ b/com/gamingmesh/jobs/container/Job.java @@ -126,6 +126,8 @@ public class Job { } public boolean isSame(Job job) { + if (job == null) + return false; return this.getName().equalsIgnoreCase(job.getName()); } diff --git a/com/gamingmesh/jobs/container/JobItems.java b/com/gamingmesh/jobs/container/JobItems.java index 7f571219..f1350ca9 100644 --- a/com/gamingmesh/jobs/container/JobItems.java +++ b/com/gamingmesh/jobs/container/JobItems.java @@ -73,6 +73,6 @@ public class JobItems { } public BoostMultiplier getBoost() { - return this.boostMultiplier; + return this.boostMultiplier.clone(); } }