mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fixes PS-229
Closes #2948 Co-Authored-By: Benjamin Govaerts <17101059+BenjaminGoGurts@users.noreply.github.com>
This commit is contained in:
parent
22baabf751
commit
7591d88d00
@ -142,7 +142,8 @@ public class Auto extends SubCommand {
|
|||||||
} else {
|
} else {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("permission.cant_claim_more_plots"),
|
TranslatableCaption.of("permission.cant_claim_more_plots"),
|
||||||
Template.of("amount", "0")
|
Template.of("amount", String.valueOf(player.getAllowedPlots())
|
||||||
|
)
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -107,17 +107,18 @@ public class Claim extends SubCommand {
|
|||||||
if (metaDataAccess.isPresent()) {
|
if (metaDataAccess.isPresent()) {
|
||||||
grants = metaDataAccess.get().orElse(0);
|
grants = metaDataAccess.get().orElse(0);
|
||||||
if (grants <= 0) {
|
if (grants <= 0) {
|
||||||
metaDataAccess.remove();
|
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("permission.cant_claim_more_plots"),
|
TranslatableCaption.of("permission.cant_claim_more_plots"),
|
||||||
Template.of("amount", String.valueOf(grants))
|
Template.of("amount", String.valueOf(grants))
|
||||||
);
|
);
|
||||||
|
metaDataAccess.remove();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("permission.cant_claim_more_plots"),
|
TranslatableCaption.of("permission.cant_claim_more_plots"),
|
||||||
Template.of("amount", String.valueOf(grants))
|
Template.of("amount", String.valueOf(player.getAllowedPlots()))
|
||||||
);
|
);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user