mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
Ground level//bedrock is at min gen height
- Add comment on == rather than <= being used - It's because it's only checking for the bedrock layer being broken if that's disabled
This commit is contained in:
parent
10c9425826
commit
d6b2b41c89
@ -354,7 +354,8 @@ public class BlockEventListener implements Listener {
|
||||
Plot plot = area.getPlot(location);
|
||||
if (plot != null) {
|
||||
BukkitPlayer plotPlayer = BukkitUtil.adapt(player);
|
||||
if (event.getBlock().getY() == area.getMinBuildHeight()) {
|
||||
// == rather than <= as we only care about the "ground level" not being destroyed
|
||||
if (event.getBlock().getY() == area.getMinGenHeight()) {
|
||||
if (!Permissions
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL)) {
|
||||
plotPlayer.sendMessage(
|
||||
@ -649,7 +650,8 @@ public class BlockEventListener implements Listener {
|
||||
event.getBlock().breakNaturally();
|
||||
}
|
||||
}
|
||||
if (location.getY() == area.getMinBuildHeight()) {
|
||||
// == rather than <= as we only care about the "ground level" not being destroyed
|
||||
if (location.getY() == area.getMinGenHeight()) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user