From 6332a9b4bac2afd2a33b9dc2a2f0ed90cc858833 Mon Sep 17 00:00:00 2001 From: Shevchik Date: Sun, 15 Dec 2013 19:29:20 +0400 Subject: [PATCH] Ooops --- .../cnaude/chairs/TryUnsitEventListener.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/com/cnaude/chairs/TryUnsitEventListener.java b/src/com/cnaude/chairs/TryUnsitEventListener.java index b28fbb2..b9716f0 100644 --- a/src/com/cnaude/chairs/TryUnsitEventListener.java +++ b/src/com/cnaude/chairs/TryUnsitEventListener.java @@ -40,17 +40,17 @@ public class TryUnsitEventListener implements Listener { if (plugin.sit.containsKey(player.getName())) { plugin.unSitPlayer(player, false, false); + event.setCancelled(true); + final Location loc = event.getTo(); + Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() + { + public void run() + { + player.teleport(loc); + player.setSneaking(false); + } + },1); } - event.setCancelled(true); - final Location loc = event.getTo(); - Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() - { - public void run() - { - player.teleport(loc); - player.setSneaking(false); - } - },1); } @EventHandler(priority=EventPriority.LOWEST)