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:
parent
22d985f0b4
commit
21673860c7
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user