From 8e07d57ad6276d5cf4fcbad555db1bfd34cab7e2 Mon Sep 17 00:00:00 2001 From: sync667 Date: Tue, 30 Oct 2018 18:41:32 +0100 Subject: [PATCH] Fixed bug with payments task stops randomly after taxes math get 0 or > 0. One function return fix too. --- src/main/java/com/gamingmesh/jobs/CMILib/CMIItemStack.java | 2 +- .../java/com/gamingmesh/jobs/economy/BufferedEconomy.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/CMILib/CMIItemStack.java b/src/main/java/com/gamingmesh/jobs/CMILib/CMIItemStack.java index 629e090d..508af044 100644 --- a/src/main/java/com/gamingmesh/jobs/CMILib/CMIItemStack.java +++ b/src/main/java/com/gamingmesh/jobs/CMILib/CMIItemStack.java @@ -172,7 +172,7 @@ public class CMIItemStack { meta.setLore(lore); } - return meta.getLore() == null ? new ArrayList<>() : meta.getLore(); + return meta.getLore() == null ? new ArrayList() : meta.getLore(); } return new ArrayList<>(); } diff --git a/src/main/java/com/gamingmesh/jobs/economy/BufferedEconomy.java b/src/main/java/com/gamingmesh/jobs/economy/BufferedEconomy.java index e332b583..7de4e0a2 100644 --- a/src/main/java/com/gamingmesh/jobs/economy/BufferedEconomy.java +++ b/src/main/java/com/gamingmesh/jobs/economy/BufferedEconomy.java @@ -140,8 +140,9 @@ public class BufferedEconomy { this.ServerTaxesAccount = Bukkit.getOfflinePlayer(ServerTaxesAccountname); if (Jobs.getGCManager().UseTaxes && Jobs.getGCManager().TransferToServerAccount && ServerTaxesAccount != null) { - economy.depositPlayer(ServerTaxesAccount, TaxesAmount); - + if(TaxesAmount > 0) { + economy.depositPlayer(ServerTaxesAccount, TaxesAmount); + } if (ServerTaxesAccount.isOnline()) { if (!Jobs.getActionbarToggleList().containsKey(ServerTaxesAccountname) && Jobs.getGCManager().ActionBarsMessageByDefault) Jobs.getActionbarToggleList().put(ServerTaxesAccountname, true);