diff --git a/Changelog.txt b/Changelog.txt index c15327c3..99873aad 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -10,3 +10,5 @@ - Fixed issue when the player gliding is not valid in 1.9.1 version - Fixed signs updating - Level, exp adding and taking amounts now correctly calculating. +- New placeholder %jobsr_user_job_(jname/number)% to show the player job. +- Added option to ignore the boosted items usage in off hand. diff --git a/src/main/java/com/gamingmesh/jobs/PlayerManager.java b/src/main/java/com/gamingmesh/jobs/PlayerManager.java index 8f1a9a41..1b82a3f5 100644 --- a/src/main/java/com/gamingmesh/jobs/PlayerManager.java +++ b/src/main/java/com/gamingmesh/jobs/PlayerManager.java @@ -882,7 +882,7 @@ public class PlayerManager { data.add(jitem.getBoost(this.getJobsPlayer(player).getJobProgression(prog))); // Lets check offhand - if (Version.isCurrentEqualOrHigher(Version.v1_9_R1)) { + if (Version.isCurrentEqualOrHigher(Version.v1_9_R1) && Jobs.getGCManager().boostedItemsInOffHand) { iih = ItemReflection.getItemInOffHand(player); if (iih != null) { jitem = getJobsItemByNbt(iih); diff --git a/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java index 0d76b16c..f1055b0e 100644 --- a/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java @@ -52,6 +52,7 @@ public class GeneralConfigManager { public boolean payExploringWhenGliding; public boolean disablePaymentIfRiding; protected boolean addXpPlayer; + public boolean boostedItemsInOffHand; public boolean payItemDurabilityLoss; public List WhiteListedItems = new ArrayList<>(); protected boolean hideJobsWithoutPermission; @@ -570,6 +571,11 @@ public class GeneralConfigManager { c.addComment("add-xp-player", "Adds the Jobs xp received to the player's Minecraft XP bar"); addXpPlayer = c.get("add-xp-player", false); + if (Version.isCurrentEqualOrHigher(Version.v1_9_R1)) { + c.addComment("enable-boosted-items-in-offhand", "Do the jobs boost ignore the boosted items usage in off hand?"); + boostedItemsInOffHand = c.get("enable-boosted-items-in-offhand", true); + } + c.addComment("allow-pay-for-durability-loss", "Allows, when losing maximum durability of item then it does not pay the player until it is repaired.", "E.g. the player wants to enchant a item with enchanting table and the item has durability loss then not paying."); c.addComment("allow-pay-for-durability-loss.Use", "Do not disable this if you don't know what mean this option.");