mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-06-26 10:25:11 +02:00
Removing of duplicated height-limit check
This commit is contained in:
parent
5eec25bdff
commit
79cc962675
|
@ -1210,18 +1210,9 @@ public class BlockEventListener implements Listener {
|
||||||
if (pp.hasPermission(Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
if (pp.hasPermission(Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (currentLocation.getY() >= area.getMaxBuildHeight() || currentLocation.getY() < area.getMinBuildHeight()) {
|
if (area.notifyIfOutsideBuildArea(pp, currentLocation.getY())) {
|
||||||
pp.sendMessage(
|
event.setCancelled(true);
|
||||||
TranslatableCaption.of("height.height_limit"),
|
break;
|
||||||
TagResolver.builder()
|
|
||||||
.tag("minheight", Tag.inserting(Component.text(area.getMinBuildHeight())))
|
|
||||||
.tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight())))
|
|
||||||
.build()
|
|
||||||
);
|
|
||||||
if (area.notifyIfOutsideBuildArea(pp, currentLocation.getY())) {
|
|
||||||
event.setCancelled(true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user