From b409aa9b7a7053320a5e2bc21b41ee0281c117de Mon Sep 17 00:00:00 2001 From: Shevchik Date: Thu, 15 Jan 2015 12:55:01 +0400 Subject: [PATCH] Remove old arrow instantly --- src/com/cnaude/chairs/core/PlayerSitData.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/com/cnaude/chairs/core/PlayerSitData.java b/src/com/cnaude/chairs/core/PlayerSitData.java index 6f3b114..f9b609e 100644 --- a/src/com/cnaude/chairs/core/PlayerSitData.java +++ b/src/com/cnaude/chairs/core/PlayerSitData.java @@ -61,9 +61,9 @@ public class PlayerSitData { sitdata.resittask = task; player.teleport(sitlocation); arrow.setPassenger(player); - sitdata.sitting = true; sit.put(player, sitdata); sitblock.put(blocktooccupy, player); + sitdata.sitting = true; return true; } @@ -74,17 +74,8 @@ public class PlayerSitData { Entity arrow = plugin.getNMSAccess().spawnArrow(prevarrow.getLocation()); arrow.setPassenger(player); sitdata.arrow = arrow; + prevarrow.remove(); sitdata.sitting = true; - Bukkit.getScheduler().scheduleSyncDelayedTask( - plugin, - new Runnable() { - @Override - public void run() { - prevarrow.remove(); - } - }, - 100 - ); } public boolean unsitPlayer(Player player) {