From a5f5dc099b4d5d0b3ff7aa04de7a14e40dd087bf Mon Sep 17 00:00:00 2001 From: wizjany Date: Sun, 29 May 2016 00:54:58 -0400 Subject: [PATCH] Disable left-click air task creation. This should really not be necessary anymore. Reverts 13f36757. Fixes WORLDEDIT-3444. --- .../worldedit/bukkit/WorldEditListener.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditListener.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditListener.java index af5736b93..bd9a92b09 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditListener.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditListener.java @@ -27,7 +27,6 @@ import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.internal.LocalWorldAdapter; import com.sk89q.worldedit.world.World; -import org.bukkit.Bukkit; import org.bukkit.block.Block; import org.bukkit.event.Event.Result; import org.bukkit.event.EventHandler; @@ -45,7 +44,6 @@ import org.bukkit.inventory.EquipmentSlot; public class WorldEditListener implements Listener { private WorldEditPlugin plugin; - private boolean ignoreLeftClickAir = false; /** * Called when a player plays an animation, such as an arm swing @@ -143,22 +141,7 @@ public class WorldEditListener implements Listener { event.setCancelled(true); } - if (!ignoreLeftClickAir) { - final int taskId = Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { - @Override - public void run() { - ignoreLeftClickAir = false; - } - }, 2); - - if (taskId != -1) { - ignoreLeftClickAir = true; - } - } } else if (action == Action.LEFT_CLICK_AIR) { - if (ignoreLeftClickAir) { - return; - } if (we.handleArmSwing(player)) { event.setCancelled(true);