From 39158816cf6bf2b588e76c8a2f513de6a884c448 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Mon, 22 Aug 2016 23:46:27 +1000 Subject: [PATCH] Fixes #251 --- .../src/main/java/com/thevoxelbox/voxelsniper/Sniper.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/favs/src/main/java/com/thevoxelbox/voxelsniper/Sniper.java b/favs/src/main/java/com/thevoxelbox/voxelsniper/Sniper.java index 492cd47d..2e8953f0 100644 --- a/favs/src/main/java/com/thevoxelbox/voxelsniper/Sniper.java +++ b/favs/src/main/java/com/thevoxelbox/voxelsniper/Sniper.java @@ -12,7 +12,6 @@ import com.boydti.fawe.object.MaskedFaweQueue; import com.boydti.fawe.object.RegionWrapper; import com.boydti.fawe.object.changeset.FaweChangeSet; import com.boydti.fawe.util.StringMan; -import com.boydti.fawe.util.TaskManager; import com.boydti.fawe.util.WEManager; import com.google.common.base.Preconditions; import com.google.common.collect.BiMap; @@ -309,11 +308,10 @@ public class Sniper { PerformBrush performerBrush = (PerformBrush) sniperTool.getCurrentBrush(); performerBrush.initP(snipeData); } - TaskManager.IMP.async(new Runnable() { + final FawePlayer fp = FawePlayer.wrap(getPlayer()); + fp.runAsyncIfFree(new Runnable() { @Override public void run() { - FawePlayer fp = FawePlayer.wrap(getPlayer()); - fp.setMeta("fawe_action", true); try { boolean result = brush.perform(snipeAction, snipeData, targetBlock, lastBlock); if (result) { @@ -322,8 +320,6 @@ public class Sniper { world.commit(); } catch (Throwable e) { e.printStackTrace(); - } finally { - fp.deleteMeta("fawe_action"); } } });