New conf.json option "claimsCanBeUnconnectedIfOwnedByOtherFaction" (default true) which, will allow claims to bypass the "claimsMustBeConnected" option if the attempted claim is vulnerable land controlled by another faction
This commit is contained in:
parent
5686c4db9d
commit
16053d0008
@ -73,6 +73,7 @@ public class Conf {
|
||||
public static int noPVPDamageToOthersForXSecondsAfterLogin = 3;
|
||||
|
||||
public static boolean claimsMustBeConnected = false;
|
||||
public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true;
|
||||
|
||||
public static double considerFactionsReallyOfflineAfterXMinutes = 0;
|
||||
|
||||
|
@ -503,8 +503,16 @@ public class FPlayer {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Conf.claimsMustBeConnected && myFaction.getLandRoundedInWorld(flocation.getWorldName()) > 0 && !Board.isConnectedLocation(flocation, myFaction)) {
|
||||
sendMessage("You can only claim additional land which is connected to your first claim!");
|
||||
if (
|
||||
Conf.claimsMustBeConnected
|
||||
&& myFaction.getLandRoundedInWorld(flocation.getWorldName()) > 0
|
||||
&& !Board.isConnectedLocation(flocation, myFaction)
|
||||
&& (!Conf.claimsCanBeUnconnectedIfOwnedByOtherFaction || !otherFaction.isNormal())
|
||||
) {
|
||||
if (Conf.claimsCanBeUnconnectedIfOwnedByOtherFaction)
|
||||
sendMessage("You can only claim additional land which is connected to your first claim or controlled by another faction!");
|
||||
else
|
||||
sendMessage("You can only claim additional land which is connected to your first claim!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user