Bad idea, just cancel the event
This commit is contained in:
parent
6332a9b4ba
commit
6e8132ee0f
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user