From 9143051d9f3f5e4084eafe07526c1b9fc0de8ab8 Mon Sep 17 00:00:00 2001 From: bm01 Date: Sat, 16 Feb 2013 02:56:46 +0100 Subject: [PATCH] Run GreenThumbTimer on the current tick It avoids onBlockBreak to be called twice (which basically launched the task twice). I don't know what were the consequences but that wasn't right anyway. Also it would be better if we wouldn't have to cancel the event, because there is a possibility that plugins like LogBlock don't have a chance to process it. --- src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java index 14efc4bd6..a4e8fac75 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java @@ -289,7 +289,7 @@ public class Herbalism { break; } - plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new GreenThumbTimer(block, profile, type), 1); + plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new GreenThumbTimer(block, profile, type), 0); player.updateInventory(); // Needed until replacement available } }