1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-01 15:03:36 +01:00

Fix for issue with Dye action and lether armor

This commit is contained in:
Zrips 2018-02-15 13:17:35 +02:00
parent 8726052187
commit 5d0a70ad9b
2 changed files with 13 additions and 8 deletions

View File

@ -3,7 +3,6 @@ package com.gamingmesh.jobs.container;
import org.bukkit.entity.Player;
import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.stuff.Debug;
public class ItemBonusCache {
@ -36,7 +35,6 @@ public class ItemBonusCache {
}
public ItemBonusCache recheck() {
Debug.D("recalculating item bonus");
bm = Jobs.getPlayerManager().getInventoryBoost(player, job);
lastCheck = System.currentTimeMillis();
return this;

View File

@ -485,19 +485,26 @@ public class JobsPaymentListener implements Listener {
for (int i = 0; i < sourceItems.length; i++) {
if (sourceItems[i] == null)
continue;
if (sourceItems[i].getTypeId() > 0) {
if (sourceItems[i].getTypeId() == 351)
int id = sourceItems[i].getTypeId();
if (id > 0) {
if (id == 351)
DyeStack.add(sourceItems[i]);
y++;
if (y == 0)
first = sourceItems[i].getTypeId();
first = id;
if (y == 1)
second = sourceItems[i].getTypeId();
second = id;
if (y == 2)
third = sourceItems[i].getTypeId();
third = id;
}
if (sourceItems[i].getTypeId() == 299)
if (id == 299)
leather = true;
if (id == 300)
leather = true;
if (id == 301)
leather = true;
if (id == 298)
leather = true;
}