From ab080914b0625f75c023c70508e9644d7c2343e4 Mon Sep 17 00:00:00 2001 From: Shevchik Date: Sat, 14 Dec 2013 21:16:05 +0400 Subject: [PATCH] Fix instant unsit after sit --- src/com/cnaude/chairs/Chairs.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/cnaude/chairs/Chairs.java b/src/com/cnaude/chairs/Chairs.java index ee3cf95..be665f1 100644 --- a/src/com/cnaude/chairs/Chairs.java +++ b/src/com/cnaude/chairs/Chairs.java @@ -134,7 +134,6 @@ public class Chairs extends JavaPlugin { sitblock.put(block, player.getName()); sitblockbr.put(player.getName(), block); startReSitTask(player); - player.teleport(player.getWorld().getSpawnLocation()); } catch (Exception e) { e.printStackTrace(); } @@ -155,8 +154,9 @@ public class Chairs extends JavaPlugin { protected void reSitPlayer(final Player player) { try { - player.eject(); final Entity prevarrow = sit.get(player.getName()); + sit.remove(player.getName()); + player.eject(); Block block = sitblockbr.get(player.getName()); Location arrowloc = block.getLocation().add(0.5, 0 , 0.5); Entity arrow = player.getWorld().spawnArrow(arrowloc, new Vector(0, 0.1 ,0), 0, 0);