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 int noPVPDamageToOthersForXSecondsAfterLogin = 3;
|
||||||
|
|
||||||
public static boolean claimsMustBeConnected = false;
|
public static boolean claimsMustBeConnected = false;
|
||||||
|
public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true;
|
||||||
|
|
||||||
public static double considerFactionsReallyOfflineAfterXMinutes = 0;
|
public static double considerFactionsReallyOfflineAfterXMinutes = 0;
|
||||||
|
|
||||||
|
@ -503,7 +503,15 @@ public class FPlayer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Conf.claimsMustBeConnected && myFaction.getLandRoundedInWorld(flocation.getWorldName()) > 0 && !Board.isConnectedLocation(flocation, myFaction)) {
|
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!");
|
sendMessage("You can only claim additional land which is connected to your first claim!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user