Fixes PS-229

Closes #2948

Co-Authored-By: Benjamin Govaerts <17101059+BenjaminGoGurts@users.noreply.github.com>
This commit is contained in:
NotMyFault 2021-03-23 23:44:27 +01:00
parent 22baabf751
commit 7591d88d00
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
2 changed files with 5 additions and 3 deletions

View File

@ -142,7 +142,8 @@ public class Auto extends SubCommand {
} else {
player.sendMessage(
TranslatableCaption.of("permission.cant_claim_more_plots"),
Template.of("amount", "0")
Template.of("amount", String.valueOf(player.getAllowedPlots())
)
);
return false;
}

View File

@ -107,17 +107,18 @@ public class Claim extends SubCommand {
if (metaDataAccess.isPresent()) {
grants = metaDataAccess.get().orElse(0);
if (grants <= 0) {
metaDataAccess.remove();
player.sendMessage(
TranslatableCaption.of("permission.cant_claim_more_plots"),
Template.of("amount", String.valueOf(grants))
);
metaDataAccess.remove();
}
} else {
player.sendMessage(
TranslatableCaption.of("permission.cant_claim_more_plots"),
Template.of("amount", String.valueOf(grants))
Template.of("amount", String.valueOf(player.getAllowedPlots()))
);
return false;
}
}