mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Lets check offhand for boosted item
This commit is contained in:
parent
3de7453675
commit
7fbfab2c4c
@ -34,6 +34,8 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gamingmesh.jobs.CMILib.ItemReflection;
|
||||
import com.gamingmesh.jobs.CMILib.VersionChecker.Version;
|
||||
import com.gamingmesh.jobs.api.JobsJoinEvent;
|
||||
import com.gamingmesh.jobs.api.JobsLeaveEvent;
|
||||
import com.gamingmesh.jobs.api.JobsLevelUpEvent;
|
||||
@ -54,6 +56,7 @@ import com.gamingmesh.jobs.dao.JobsDAO;
|
||||
import com.gamingmesh.jobs.dao.JobsDAOData;
|
||||
import com.gamingmesh.jobs.economy.PaymentData;
|
||||
import com.gamingmesh.jobs.economy.PointsData;
|
||||
import com.gamingmesh.jobs.stuff.Debug;
|
||||
import com.gamingmesh.jobs.stuff.PerformCommands;
|
||||
|
||||
public class PlayerManager {
|
||||
@ -750,6 +753,16 @@ public class PlayerManager {
|
||||
if (jitem != null && jitem.getJobs().contains(prog))
|
||||
data.add(jitem.getBoost(this.getJobsPlayer(player).getJobProgression(prog)));
|
||||
|
||||
// Lets check offhand
|
||||
if (Version.isCurrentEqualOrHigher(Version.v1_9_R1)) {
|
||||
iih = ItemReflection.getItemInOffHand(player);
|
||||
if (iih != null) {
|
||||
jitem = getJobsItemByNbt(iih);
|
||||
if (jitem != null && jitem.getJobs().contains(prog))
|
||||
data.add(jitem.getBoost(this.getJobsPlayer(player).getJobProgression(prog)));
|
||||
}
|
||||
}
|
||||
|
||||
for (ItemStack OneArmor : player.getInventory().getArmorContents()) {
|
||||
if (OneArmor == null || OneArmor.getType() == org.bukkit.Material.AIR)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user