diff --git a/src/main/java/com/gamingmesh/jobs/PermissionManager.java b/src/main/java/com/gamingmesh/jobs/PermissionManager.java index d494472f..e7f9a523 100644 --- a/src/main/java/com/gamingmesh/jobs/PermissionManager.java +++ b/src/main/java/com/gamingmesh/jobs/PermissionManager.java @@ -153,7 +153,7 @@ public class PermissionManager { double temp = Double.parseDouble(permission.getKey().replace(perm, "")); if (cumulative) amount += temp; - else if (allowMinus || temp > amount) + else if (amount == 0D || allowMinus || temp > amount) amount = temp; } catch (NumberFormatException ignored) { ignored.printStackTrace(); diff --git a/src/main/java/com/gamingmesh/jobs/PlayerManager.java b/src/main/java/com/gamingmesh/jobs/PlayerManager.java index 24a02a63..e0d94084 100644 --- a/src/main/java/com/gamingmesh/jobs/PlayerManager.java +++ b/src/main/java/com/gamingmesh/jobs/PlayerManager.java @@ -859,7 +859,7 @@ public class PlayerManager { ItemStack iih = Jobs.getNms().getItemInMainHand(player); JobItems jitem = getJobsItemByNbt(iih); if (jitem != null && jitem.getJobs().contains(prog)) - data.add(jitem.getBoost(this.getJobsPlayer(player).getJobProgression(prog))); + data.add(jitem.getBoost(getJobsPlayer(player).getJobProgression(prog))); // Lets check offhand if (Version.isCurrentEqualOrHigher(Version.v1_9_R1) && Jobs.getGCManager().boostedItemsInOffHand) { @@ -867,19 +867,19 @@ public class PlayerManager { if (iih != null) { jitem = getJobsItemByNbt(iih); if (jitem != null && jitem.getJobs().contains(prog)) - data.add(jitem.getBoost(this.getJobsPlayer(player).getJobProgression(prog))); + data.add(jitem.getBoost(getJobsPlayer(player).getJobProgression(prog))); } } - for (ItemStack OneArmor : player.getInventory().getArmorContents()) { - if (OneArmor == null || OneArmor.getType() == org.bukkit.Material.AIR) + for (ItemStack oneArmor : player.getInventory().getArmorContents()) { + if (oneArmor == null || oneArmor.getType() == org.bukkit.Material.AIR) continue; - JobItems armorboost = getJobsItemByNbt(OneArmor); + JobItems armorboost = getJobsItemByNbt(oneArmor); if (armorboost == null || !armorboost.getJobs().contains(prog)) continue; - data.add(armorboost.getBoost(this.getJobsPlayer(player).getJobProgression(prog))); + data.add(armorboost.getBoost(getJobsPlayer(player).getJobProgression(prog))); } return data;