Skip to content
Permalink
Browse files

Fixed issue with chairLoc being null

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

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

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

0 comments on commit 9e7bd2f

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