mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-01 04:51:26 +01:00
Added option to ignore boosted items in offhand
This commit is contained in:
parent
396604924d
commit
b42e1002e5
@ -10,3 +10,5 @@
|
|||||||
- Fixed issue when the player gliding is not valid in 1.9.1 version
|
- Fixed issue when the player gliding is not valid in 1.9.1 version
|
||||||
- Fixed signs updating
|
- Fixed signs updating
|
||||||
- Level, exp adding and taking amounts now correctly calculating.
|
- 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.
|
||||||
|
@ -882,7 +882,7 @@ public class PlayerManager {
|
|||||||
data.add(jitem.getBoost(this.getJobsPlayer(player).getJobProgression(prog)));
|
data.add(jitem.getBoost(this.getJobsPlayer(player).getJobProgression(prog)));
|
||||||
|
|
||||||
// Lets check offhand
|
// Lets check offhand
|
||||||
if (Version.isCurrentEqualOrHigher(Version.v1_9_R1)) {
|
if (Version.isCurrentEqualOrHigher(Version.v1_9_R1) && Jobs.getGCManager().boostedItemsInOffHand) {
|
||||||
iih = ItemReflection.getItemInOffHand(player);
|
iih = ItemReflection.getItemInOffHand(player);
|
||||||
if (iih != null) {
|
if (iih != null) {
|
||||||
jitem = getJobsItemByNbt(iih);
|
jitem = getJobsItemByNbt(iih);
|
||||||
|
@ -52,6 +52,7 @@ public class GeneralConfigManager {
|
|||||||
public boolean payExploringWhenGliding;
|
public boolean payExploringWhenGliding;
|
||||||
public boolean disablePaymentIfRiding;
|
public boolean disablePaymentIfRiding;
|
||||||
protected boolean addXpPlayer;
|
protected boolean addXpPlayer;
|
||||||
|
public boolean boostedItemsInOffHand;
|
||||||
public boolean payItemDurabilityLoss;
|
public boolean payItemDurabilityLoss;
|
||||||
public List<String> WhiteListedItems = new ArrayList<>();
|
public List<String> WhiteListedItems = new ArrayList<>();
|
||||||
protected boolean hideJobsWithoutPermission;
|
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");
|
c.addComment("add-xp-player", "Adds the Jobs xp received to the player's Minecraft XP bar");
|
||||||
addXpPlayer = c.get("add-xp-player", false);
|
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.",
|
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.");
|
"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.");
|
c.addComment("allow-pay-for-durability-loss.Use", "Do not disable this if you don't know what mean this option.");
|
||||||
|
Loading…
Reference in New Issue
Block a user