mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-06-26 10:25:11 +02:00
Merge 79cc962675
into c65c9e7827
This commit is contained in:
commit
00156caf0d
|
@ -164,13 +164,6 @@ public class BlockEventListener implements Listener {
|
||||||
if (plot != null) {
|
if (plot != null) {
|
||||||
if (area.notifyIfOutsideBuildArea(pp, location.getY())) {
|
if (area.notifyIfOutsideBuildArea(pp, location.getY())) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
pp.sendMessage(
|
|
||||||
TranslatableCaption.of("height.height_limit"),
|
|
||||||
TagResolver.builder()
|
|
||||||
.tag("minheight", Tag.inserting(Component.text(area.getMinBuildHeight())))
|
|
||||||
.tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight())))
|
|
||||||
.build()
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
|
@ -262,13 +255,6 @@ public class BlockEventListener implements Listener {
|
||||||
}
|
}
|
||||||
} else if (area.notifyIfOutsideBuildArea(plotPlayer, location.getY())) {
|
} else if (area.notifyIfOutsideBuildArea(plotPlayer, location.getY())) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
plotPlayer.sendMessage(
|
|
||||||
TranslatableCaption.of("height.height_limit"),
|
|
||||||
TagResolver.builder()
|
|
||||||
.tag("minheight", Tag.inserting(Component.text(area.getMinBuildHeight())))
|
|
||||||
.tag("maxheight", Tag.inserting(Component.text(area.getMaxBuildHeight())))
|
|
||||||
.build()
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
|
@ -1224,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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -679,10 +679,8 @@ public abstract class PlotArea implements ComponentLike {
|
||||||
TranslatableCaption.of("height.height_limit"),
|
TranslatableCaption.of("height.height_limit"),
|
||||||
TagResolver.builder()
|
TagResolver.builder()
|
||||||
.tag("minheight", Tag.inserting(Component.text(minBuildHeight)))
|
.tag("minheight", Tag.inserting(Component.text(minBuildHeight)))
|
||||||
.tag(
|
.tag("maxheight", Tag.inserting(Component.text(maxBuildHeight)))
|
||||||
"maxheight",
|
.build()
|
||||||
Tag.inserting(Component.text(maxBuildHeight))
|
|
||||||
).build()
|
|
||||||
);
|
);
|
||||||
// Return true if "failed" as the method will always be inverted otherwise
|
// Return true if "failed" as the method will always be inverted otherwise
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user