1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-02 14:29:07 +01:00

Fix different logic behavior for fast payment

This commit is contained in:
montlikadani 2020-10-23 16:53:49 +02:00
parent 22d985f0b4
commit 21673860c7
4 changed files with 8 additions and 15 deletions

View File

@ -845,8 +845,7 @@ public class PlayerManager {
ItemBonusCache c = cj.get(prog);
if (c == null) {
c = new ItemBonusCache();
c.setBoostMultiplier(getInventoryBoost(player, prog));
c = new ItemBonusCache(getInventoryBoost(player, prog));
cj.put(prog, c);
return c.getBoostMultiplier();
}

View File

@ -4,11 +4,11 @@ public class ItemBonusCache {
private BoostMultiplier bm = new BoostMultiplier();
public ItemBonusCache(BoostMultiplier bm) {
this.bm = bm;
}
public BoostMultiplier getBoostMultiplier() {
return bm;
}
public void setBoostMultiplier(BoostMultiplier bm) {
this.bm = bm;
}
}

View File

@ -122,13 +122,7 @@ public class QuestProgression {
jPlayer.setSaved(false);
if (!isCompleted())
return;
if (!jPlayer.isOnline())
return;
if (givenReward)
if (!isCompleted() || !jPlayer.isOnline() || givenReward)
return;
givenReward = true;

View File

@ -384,8 +384,8 @@ public class JobsPaymentListener implements Listener {
FastPayment fp = Jobs.FASTPAYMENT.get(player.getUniqueId());
if (fp != null) {
if (fp.getTime() > System.currentTimeMillis() && fp.getInfo().getName().equalsIgnoreCase(bInfo.getName()) ||
fp.getInfo().getNameWithSub().equalsIgnoreCase(bInfo.getNameWithSub())) {
if (fp.getTime() > System.currentTimeMillis() && (fp.getInfo().getName().equalsIgnoreCase(bInfo.getName()) ||
fp.getInfo().getNameWithSub().equalsIgnoreCase(bInfo.getNameWithSub()))) {
Jobs.perform(fp.getPlayer(), fp.getInfo(), fp.getPayment(), fp.getJob());
return;
}