Take building min height also into consideration

This commit is contained in:
NotMyFault 2021-04-11 10:12:37 +02:00
parent ba4146f82c
commit e1fb8c1ae5
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
3 changed files with 6 additions and 4 deletions

View File

@ -289,7 +289,8 @@ public class BlockEventListener implements Listener {
event.setCancelled(true); event.setCancelled(true);
pp.sendMessage( pp.sendMessage(
TranslatableCaption.of("height.height_limit"), TranslatableCaption.of("height.height_limit"),
Template.of("limit", String.valueOf(area.getMaxBuildHeight())) Template.of("minHeight", String.valueOf(area.getMinBuildHeight())),
Template.of("maxHeight", String.valueOf(area.getMaxBuildHeight()))
); );
} }
if (!plot.hasOwner()) { if (!plot.hasOwner()) {
@ -374,7 +375,8 @@ public class BlockEventListener implements Listener {
event.setCancelled(true); event.setCancelled(true);
plotPlayer.sendMessage( plotPlayer.sendMessage(
TranslatableCaption.of("height.height_limit"), TranslatableCaption.of("height.height_limit"),
Template.of("limit", String.valueOf(area.getMaxBuildHeight())) Template.of("minHeight", String.valueOf(area.getMinBuildHeight())),
Template.of("maxHeight", String.valueOf(area.getMaxBuildHeight()))
); );
} }
if (!plot.hasOwner()) { if (!plot.hasOwner()) {

View File

@ -39,7 +39,7 @@ dependencies {
testImplementation("com.sk89q.worldedit:worldedit-core:7.2.2") testImplementation("com.sk89q.worldedit:worldedit-core:7.2.2")
// Logging // Logging
api("org.slf4j:slf4j-api:1.7.30") api("org.slf4j:slf4j-api:1.7.25")
runtimeOnly("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1") { runtimeOnly("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1") {
exclude(group = "org.slf4j") exclude(group = "org.slf4j")
} }

View File

@ -56,7 +56,7 @@
"worldedit.worldedit_bypass": "<prefix><gray><italic>To bypass your restrictions use </gray><dark_aqua><command></dark_aqua></italic>", "worldedit.worldedit_bypass": "<prefix><gray><italic>To bypass your restrictions use </gray><dark_aqua><command></dark_aqua></italic>",
"worldedit.worldedit_bypassed": "<prefix><gray>Currently bypassing WorldEdit restriction.</gray>", "worldedit.worldedit_bypassed": "<prefix><gray>Currently bypassing WorldEdit restriction.</gray>",
"gamemode.gamemode_was_bypassed": "<prefix><gold>You bypassed the gamemode (</gold><gray><gamemode></gray><gold>) <gold>set for </gold><gray><plot>.</gray>", "gamemode.gamemode_was_bypassed": "<prefix><gold>You bypassed the gamemode (</gold><gray><gamemode></gray><gold>) <gold>set for </gold><gray><plot>.</gray>",
"height.height_limit": "<prefix><gold>This plot area has a height limit of </gold><gray><limit>.</gray>", "height.height_limit": "<prefix><gold>This plot area has building height limits: Min height: </gold><gray><minHeight></gray><gold>, Max height: </gold><gray><maxHeight></gray>",
"notification.notify_enter": "<prefix><gray><player> entered your plot (</gray><gold><plot></gold><gray>).</gray>", "notification.notify_enter": "<prefix><gray><player> entered your plot (</gray><gold><plot></gold><gray>).</gray>",
"notification.notify_leave": "<prefix><gray><player> left your plot (</gray><gold><plot></gold><gray>).</gray>", "notification.notify_leave": "<prefix><gray><player> left your plot (</gray><gold><plot></gold><gray>).</gray>",
"swap.swap_overlap": "<prefix><red>The proposed areas are not allowed to overlap.</red>", "swap.swap_overlap": "<prefix><red>The proposed areas are not allowed to overlap.</red>",