Use prevarrow location as location for new arrow

This commit is contained in:
Shevchik 2014-03-07 20:16:15 +04:00
parent bcc9e92efb
commit bf540798d9

View File

@ -72,9 +72,7 @@ public class PlayerSitData {
final Entity prevarrow = sit.get(player.getName()); final Entity prevarrow = sit.get(player.getName());
sit.remove(player.getName()); sit.remove(player.getName());
player.eject(); player.eject();
Block block = sitblockbr.get(player.getName()); Entity arrow = plugin.getNMSAccess().spawnArrow(prevarrow.getLocation());
Location arrowloc = block.getLocation().add(0.5, 0 , 0.5);
Entity arrow = plugin.getNMSAccess().spawnArrow(arrowloc);
arrow.setPassenger(player); arrow.setPassenger(player);
sit.put(player.getName(), arrow); sit.put(player.getName(), arrow);
Bukkit.getScheduler().scheduleSyncDelayedTask( Bukkit.getScheduler().scheduleSyncDelayedTask(