forked from Upstream/mmocore
fix vanilla-drops set to false dropping the regen block as well
This commit is contained in:
parent
414cb0abd4
commit
d2999a0e2c
@ -1,5 +1,6 @@
|
|||||||
package net.Indyuce.mmocore.listener;
|
package net.Indyuce.mmocore.listener;
|
||||||
|
|
||||||
|
import io.lumine.mythic.utils.Schedulers;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -134,8 +135,12 @@ public class BlockListener implements Listener {
|
|||||||
/*
|
/*
|
||||||
* Finally enable block regen.
|
* Finally enable block regen.
|
||||||
*/
|
*/
|
||||||
if (info.hasRegen())
|
if (info.hasRegen()) {
|
||||||
MMOCore.plugin.mineManager.initialize(info.startRegeneration(Bukkit.createBlockData(savedData), block.getLocation()), !temporaryBlock);
|
Schedulers.async().runLater(()-> {
|
||||||
|
MMOCore.plugin.mineManager.initialize(info.startRegeneration(Bukkit.createBlockData(savedData), block.getLocation()), !temporaryBlock);
|
||||||
|
}, 1);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
|
Loading…
Reference in New Issue
Block a user