From bd0f12403125919a514739bf4cf5f2e803003693 Mon Sep 17 00:00:00 2001 From: Zrips Date: Mon, 12 Nov 2018 13:10:14 +0200 Subject: [PATCH] Lets update boosts based by permission each time using info command --- src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java | 2 +- .../java/com/gamingmesh/jobs/config/GeneralConfigManager.java | 3 +-- src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java b/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java index 3a62b757..7ee18066 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java +++ b/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java @@ -426,7 +426,7 @@ public class JobsCommands implements CommandExecutor { public static String jobInfoMessage(JobsPlayer player, Job job, ActionType type) { // money exp boost - Boost boost = Jobs.getPlayerManager().getFinalBonus(player, job); + Boost boost = Jobs.getPlayerManager().getFinalBonus(player, job, true); StringBuilder message = new StringBuilder(); diff --git a/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java index e5ae83fe..8b209ce9 100644 --- a/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java @@ -938,8 +938,7 @@ public class GeneralConfigManager { guiBackButton = tmat == null ? CMIMaterial.JACK_O_LANTERN.newItemStack() : tmat.newItemStack(); tmat = CMIMaterial.get(c.get("JobsGUI.Filler.Material", "STAINED_GLASS_PANE")); - Debug.D(c.get("JobsGUI.Filler.Material", "STAINED_GLASS_PANE")); - Debug.D( CMIMaterial.get(c.get("JobsGUI.Filler.Material", "STAINED_GLASS_PANE"))); + guiFiller = tmat == null ? CMIMaterial.GREEN_STAINED_GLASS_PANE.newItemStack() : tmat.newItemStack(); ItemMeta meta = guiFiller.getItemMeta(); meta.setDisplayName(" "); diff --git a/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java b/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java index 427b7212..6442657e 100644 --- a/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java +++ b/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java @@ -34,6 +34,7 @@ import com.gamingmesh.jobs.dao.JobsDAO; import com.gamingmesh.jobs.economy.PaymentData; import com.gamingmesh.jobs.resources.jfep.Parser; import com.gamingmesh.jobs.stuff.ChatColor; +import com.gamingmesh.jobs.stuff.Debug; import com.gamingmesh.jobs.stuff.FurnaceBrewingHandling; import com.gamingmesh.jobs.stuff.Perm; import com.gamingmesh.jobs.stuff.TimeManage; @@ -242,7 +243,7 @@ public class JobsPlayer { ArrayList counterList = new ArrayList<>(); counterList.add(new BoostCounter(type, Boost, time)); - + boostCounter.put(JobName, counterList); return Boost; } @@ -260,6 +261,7 @@ public class JobsPlayer { v1 = Jobs.getPermissionManager().getMaxPermission(this, "jobs.boost.all." + type.getName().toLowerCase()); if (Boost == null || v1 != null && v1 > Boost) Boost = v1; + Debug.D(Boost +" "+ JobName + " " + type); return Boost == null ? 0D : Boost; }