From edb4c0b61aa13ad322f0cfe049863f1b94dd2770 Mon Sep 17 00:00:00 2001 From: Wyatt Childers Date: Mon, 30 May 2016 19:38:52 -0400 Subject: [PATCH] Disable left-click air task creation (in Sponge) Following the lead of the Bukkit implementation in commit a5f5dc099b4d5d0b3ff7aa04de7a14e40dd087bf, disable left-click air task creation --- .../sk89q/worldedit/sponge/SpongeWorldEdit.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorldEdit.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorldEdit.java index d2f51617a..96ec5c2b6 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorldEdit.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorldEdit.java @@ -136,8 +136,6 @@ public class SpongeWorldEdit { WorldEdit.getInstance().getEventBus().post(new PlatformReadyEvent()); } - private boolean ignoreLeftClickAir = false; - @Listener public void onPlayerInteract(InteractBlockEvent event, @Root Player spongePlayer) { if (platform == null) { @@ -171,20 +169,7 @@ public class SpongeWorldEdit { if (we.handleArmSwing(player)) { event.setCancelled(true); } - - if (!ignoreLeftClickAir) { - Task.builder().delayTicks(2).execute(() -> { - ignoreLeftClickAir = false; - - }).submit(this); - - ignoreLeftClickAir = true; - } } else { - if (ignoreLeftClickAir) { - return; - } - if (we.handleArmSwing(player)) { event.setCancelled(true); }