From 4a35431be8810124e9bfba0543842a00c515887b Mon Sep 17 00:00:00 2001 From: montlikadani Date: Sun, 11 Oct 2020 16:16:01 +0200 Subject: [PATCH] Fix for stripping logs not works from tests Fixes #955 --- src/main/java/com/gamingmesh/jobs/config/LanguageManager.java | 2 -- src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java | 3 ++- .../com/gamingmesh/jobs/listeners/JobsPaymentListener.java | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java b/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java index 90892d09..e5c1508f 100644 --- a/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java @@ -72,7 +72,6 @@ public class LanguageManager { c.get("economy.error.nomoney", "&cSorry, no money left in national bank!"); c.get("limitedItem.error.levelup", "&cYou need to level up in [jobname] to use this item!"); - c.get("general.Spawner", "&r[type] Spawner"); c.get("general.info.toplineseparator", "&7*********************** &6%playername% &7***********************"); c.get("general.info.separator", "&7*******************************************************"); c.get("general.info.time.days", "&e%days% &6days "); @@ -630,7 +629,6 @@ public class LanguageManager { c.get("message.cowtimer", "&eYou still need to wait &6%time% &esec to get paid for this job."); c.get("message.blocktimer", "&eYou need to wait &3[time] &esec more to get paid for this!"); - c.get("message.placeblocktimer", "&eYou can't place blocks faster than &6[time] &esec in the same place!"); c.get("message.taxes", "&3[amount] &eserver taxes were transferred to this account"); c.get("message.boostStarted", "&eJobs boost time have been started!"); diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java index cf58b851..94f14d4f 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java @@ -89,7 +89,8 @@ import com.gamingmesh.jobs.stuff.Util; public class JobsListener implements Listener { private Jobs plugin; - private HashMap interactDelay = new HashMap<>(); + + private final HashMap interactDelay = new HashMap<>(); public JobsListener(Jobs plugin) { this.plugin = plugin; diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index 00e45453..09a5dcee 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -1687,8 +1687,8 @@ public class JobsPaymentListener implements Listener { - Jobs.getNms().getDurability(iih) != iih.getType().getMaxDurability()) return; - Bukkit.getScheduler().runTaskLater(plugin, () -> - Jobs.action(jPlayer, new BlockActionInfo(block, ActionType.STRIPLOGS), block), 3); + Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> + Jobs.action(jPlayer, new BlockActionInfo(block, ActionType.STRIPLOGS), block), 1); } } }