diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java b/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java index 19b217ba5..93c5dff53 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java @@ -33,9 +33,11 @@ public class Commandbigtree extends EssentialsCommand { throw new NotEnoughArgumentsException(); } - final Location loc = LocationUtil.getTarget(user.getBase()); - final Location safeLocation = LocationUtil.getSafeDestination(loc); - final boolean success = user.getWorld().generateTree(safeLocation, tree); + final Location loc = LocationUtil.getTarget(user.getBase()).add(0, 1, 0); + if (!user.getWorld().getBlockAt(loc).isPassable()) { + throw new Exception(tl("bigTreeFailure")); + } + final boolean success = user.getWorld().generateTree(loc, tree); if (success) { user.sendMessage(tl("bigTreeSuccess")); } else { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtree.java b/Essentials/src/com/earth2me/essentials/commands/Commandtree.java index f57505057..a477c18b2 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtree.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtree.java @@ -42,9 +42,11 @@ public class Commandtree extends EssentialsCommand { } } - final Location loc = LocationUtil.getTarget(user.getBase()); - final Location safeLocation = LocationUtil.getSafeDestination(loc); - final boolean success = user.getWorld().generateTree(safeLocation, tree); + final Location loc = LocationUtil.getTarget(user.getBase()).add(0, 1, 0); + if (!user.getWorld().getBlockAt(loc).isPassable()) { + throw new Exception(tl("treeFailure")); + } + final boolean success = user.getWorld().generateTree(loc, tree); if (success) { user.sendMessage(tl("treeSpawned")); } else {