From 6e8132ee0f2d9c2c14d88c879426b54b7f420fde Mon Sep 17 00:00:00 2001 From: Shevchik Date: Sun, 15 Dec 2013 19:48:22 +0400 Subject: [PATCH] Bad idea, just cancel the event --- src/com/cnaude/chairs/TryUnsitEventListener.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/com/cnaude/chairs/TryUnsitEventListener.java b/src/com/cnaude/chairs/TryUnsitEventListener.java index b9716f0..1491a49 100644 --- a/src/com/cnaude/chairs/TryUnsitEventListener.java +++ b/src/com/cnaude/chairs/TryUnsitEventListener.java @@ -39,17 +39,7 @@ public class TryUnsitEventListener implements Listener { final Player player = event.getPlayer(); 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); } }