Fix check for over claiming. Resolves #230.

This commit is contained in:
drtshock 2015-01-29 08:30:20 -06:00
parent fc0b2a1041
commit 559695d103
3 changed files with 5 additions and 1 deletions

View File

@ -702,6 +702,9 @@ public abstract class MemoryFPlayer implements FPlayer {
} else if (!currentFaction.hasLandInflation()) {
// TODO more messages WARN current faction most importantly
error = P.p.txt.parse(TL.CLAIM_THISISSPARTA.toString(), currentFaction.getTag(this));
} else if (currentFaction.hasLandInflation() && !P.p.getConfig().getBoolean("hcf.allow-overclaim", true)) {
// deny over claim when it normally would be allowed.
error = P.p.txt.parse(TL.CLAIM_OVERCLAIM_DISABLED.toString());
} else if (!Board.getInstance().isBorderLocation(flocation)) {
error = P.p.txt.parse(TL.CLAIM_BORDER.toString());
}

View File

@ -536,6 +536,7 @@ public enum TL {
CLAIM_FORCLAIM("for claiming this land"),
CLAIM_CLAIMED("<h>%s<i> claimed land for <h>%s<i> from <h>%s<i>."),
CLAIM_CLAIMEDLOG("%s claimed land at (%s) for the faction: %s"),
CLAIM_OVERCLAIM_DISABLED("<i>Over claiming is disabled on this server."),
/**
* More generic, or less easily categorisable translations, which may apply to more than one class

View File

@ -182,7 +182,7 @@ hcf:
# Should we allow Factions to over claim if they are raidable (above has no effect on this)?
# This has always been true, allowing factions to over claim others.
overclaim: true
allow-overclaim: true
# Power Freeze
# After a player dies, how long should the faction not be able to regen power?