From 3c0a2bd67e87b711f3cdff1f4efc7fc548746b59 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 31 May 2016 00:30:16 +1000 Subject: [PATCH] Superpickaxe async --- .../worldedit/extension/platform/PlatformManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformManager.java b/core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformManager.java index 0a02c40f..57a97d19 100644 --- a/core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformManager.java +++ b/core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformManager.java @@ -366,7 +366,13 @@ public class PlatformManager { if (player.isHoldingPickAxe() && session.hasSuperPickAxe()) { final BlockTool superPickaxe = session.getSuperPickaxe(); if (superPickaxe != null && superPickaxe.canUse(player)) { - event.setCancelled(superPickaxe.actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location)); + FawePlayer fp = FawePlayer.wrap(player); + fp.runAsyncIfFree(new Runnable() { + @Override + public void run() { + superPickaxe.actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location); + } + }); return; } }