mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
Fix /bigtree command on versions 1.12 and prior (#3569)
Fixes #3549. Replaces the `Block#isPassable` check with `Material#isSolid`, which is compatible with all versions through 1.8 to 1.16.
This commit is contained in:
parent
5fa65b42ae
commit
68cd509d41
@ -34,7 +34,7 @@ public class Commandbigtree extends EssentialsCommand {
|
||||
}
|
||||
|
||||
final Location loc = LocationUtil.getTarget(user.getBase()).add(0, 1, 0);
|
||||
if (!user.getWorld().getBlockAt(loc).isPassable()) {
|
||||
if (loc.getBlock().getType().isSolid()) {
|
||||
throw new Exception(tl("bigTreeFailure"));
|
||||
}
|
||||
final boolean success = user.getWorld().generateTree(loc, tree);
|
||||
|
@ -43,7 +43,7 @@ public class Commandtree extends EssentialsCommand {
|
||||
}
|
||||
|
||||
final Location loc = LocationUtil.getTarget(user.getBase()).add(0, 1, 0);
|
||||
if (!user.getWorld().getBlockAt(loc).isPassable()) {
|
||||
if (loc.getBlock().getType().isSolid()) {
|
||||
throw new Exception(tl("treeFailure"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user