Skip to content
Permalink
Browse files

Set yaw of ArmorStand on spawn of chair.

  • Loading branch information
me4502 committed Aug 24, 2016
1 parent dc58bfa commit 86c223b46abd1ba5ec1a1ecb3b63f05851da10f4
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/main/java/com/sk89q/craftbook/mechanics/Chair.java
@@ -72,6 +72,7 @@ private void addChair(final Player player, Block block, final Location chairLoc)
}

ar = fixArrow(block, ar);
ar.getLocation().setYaw(chairLoc.getYaw());

if (hasUpdated && ar != chairs.get(player.getName()).chairEntity)
isNew = true;
@@ -85,8 +86,7 @@ private void addChair(final Player player, Block block, final Location chairLoc)
Bukkit.getScheduler().runTask(CraftBookPlugin.inst(), new Runnable() {
@Override
public void run () {
if (chairLoc != null)
player.teleport(chairLoc);
player.teleport(chairLoc);
far.setPassenger(player);
}
});
@@ -226,7 +226,6 @@ public void onRightClick(PlayerInteractEvent event) {
Location chairLoc = event.getClickedBlock().getLocation().add(0.5,0,0.5);

if(chairFacing && event.getClickedBlock().getState().getData() instanceof Directional) {

BlockFace direction = ((Directional) event.getClickedBlock().getState().getData()).getFacing();

double dx = direction.getModX();

0 comments on commit 86c223b

Please sign in to comment.
You can’t perform that action at this time.