From d2999a0e2cea757ea0bdedd12853f1a434de2847 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 9 Feb 2021 20:03:24 -0600 Subject: [PATCH] fix vanilla-drops set to false dropping the regen block as well --- .../java/net/Indyuce/mmocore/listener/BlockListener.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/listener/BlockListener.java b/src/main/java/net/Indyuce/mmocore/listener/BlockListener.java index e025f265..a4be9103 100644 --- a/src/main/java/net/Indyuce/mmocore/listener/BlockListener.java +++ b/src/main/java/net/Indyuce/mmocore/listener/BlockListener.java @@ -1,5 +1,6 @@ package net.Indyuce.mmocore.listener; +import io.lumine.mythic.utils.Schedulers; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Location; @@ -134,8 +135,12 @@ public class BlockListener implements Listener { /* * Finally enable block regen. */ - if (info.hasRegen()) - MMOCore.plugin.mineManager.initialize(info.startRegeneration(Bukkit.createBlockData(savedData), block.getLocation()), !temporaryBlock); + if (info.hasRegen()) { + Schedulers.async().runLater(()-> { + MMOCore.plugin.mineManager.initialize(info.startRegeneration(Bukkit.createBlockData(savedData), block.getLocation()), !temporaryBlock); + }, 1); + + } } @EventHandler(priority = EventPriority.HIGH)