2013-04-22 16:26:44 +02:00
|
|
|
package com.massivecraft.factions.entity;
|
|
|
|
|
2013-04-23 09:17:30 +02:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
2013-04-22 16:58:22 +02:00
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Set;
|
2013-04-24 13:50:02 +02:00
|
|
|
import java.util.UUID;
|
2013-04-22 16:58:22 +02:00
|
|
|
|
|
|
|
import com.massivecraft.factions.FFlag;
|
|
|
|
import com.massivecraft.factions.FPerm;
|
|
|
|
import com.massivecraft.factions.Rel;
|
2013-04-24 11:16:37 +02:00
|
|
|
import com.massivecraft.factions.event.FactionsEventChunkChangeType;
|
2013-04-22 16:26:44 +02:00
|
|
|
import com.massivecraft.mcore.store.Entity;
|
2013-04-23 09:17:30 +02:00
|
|
|
import com.massivecraft.mcore.util.MUtil;
|
2013-04-22 16:26:44 +02:00
|
|
|
|
|
|
|
public class UConf extends Entity<UConf>
|
|
|
|
{
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// META
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2013-04-22 16:58:22 +02:00
|
|
|
public static UConf get(Object oid)
|
2013-04-22 16:26:44 +02:00
|
|
|
{
|
2013-04-22 16:58:22 +02:00
|
|
|
return UConfColls.get().get2(oid);
|
2013-04-22 16:26:44 +02:00
|
|
|
}
|
|
|
|
|
2013-04-24 13:50:02 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// SPECIAL FACTION IDS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public String factionIdNone = UUID.randomUUID().toString();
|
|
|
|
public String factionIdSafezone = UUID.randomUUID().toString();
|
|
|
|
public String factionIdWarzone = UUID.randomUUID().toString();
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// DEFAULTS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public String defaultPlayerFactionId = this.factionIdNone;
|
|
|
|
public double defaultPlayerPower = 0.0;
|
|
|
|
public Rel defaultPlayerRole = Rel.RECRUIT;
|
|
|
|
|
|
|
|
public boolean defaultFactionOpen = false;
|
|
|
|
public Map<FFlag, Boolean> defaultFactionFlags = FFlag.getDefaultDefaults();
|
|
|
|
public Map<FPerm, Set<Rel>> defaultFactionPerms = FPerm.getDefaultDefaults();
|
|
|
|
|
2013-04-22 16:26:44 +02:00
|
|
|
// -------------------------------------------- //
|
2013-04-22 16:58:22 +02:00
|
|
|
// CORE
|
2013-04-22 16:26:44 +02:00
|
|
|
// -------------------------------------------- //
|
2013-04-24 07:51:48 +02:00
|
|
|
|
2013-04-23 14:00:18 +02:00
|
|
|
public int factionMemberLimit = 0;
|
|
|
|
public double factionPowerMax = 1000.0;
|
|
|
|
|
2013-04-22 16:58:22 +02:00
|
|
|
public int factionTagLengthMin = 3;
|
|
|
|
public int factionTagLengthMax = 10;
|
|
|
|
public boolean factionTagForceUpperCase = false;
|
|
|
|
|
2013-04-24 07:51:48 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// ASSORTED
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public boolean permanentFactionsDisableLeaderPromotion = false;
|
|
|
|
|
|
|
|
public int actionDeniedPainAmount = 2;
|
|
|
|
|
|
|
|
public boolean disablePVPForFactionlessPlayers = false;
|
|
|
|
public boolean enablePVPAgainstFactionlessInAttackersLand = false;
|
|
|
|
|
|
|
|
public double territoryShieldFactor = 0.3;
|
|
|
|
|
2013-04-22 17:20:34 +02:00
|
|
|
|
|
|
|
|
2013-04-23 17:01:43 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// POWER
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public double powerMax = 10.0;
|
|
|
|
public double powerMin = 0.0;
|
|
|
|
public double powerPerHour = 2.0;
|
|
|
|
public double powerPerDeath = -2.0;
|
|
|
|
|
2013-04-24 07:51:48 +02:00
|
|
|
public boolean canLeaveWithNegativePower = true;
|
|
|
|
|
2013-04-24 08:39:26 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// CLAIMS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public boolean claimsMustBeConnected = false;
|
|
|
|
public boolean claimingFromOthersAllowed = true;
|
|
|
|
public boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true;
|
|
|
|
public int claimsRequireMinFactionMembers = 1;
|
|
|
|
public int claimedLandsMax = 0;
|
|
|
|
|
|
|
|
// if someone is doing a radius claim and the process fails to claim land this many times in a row, it will exit
|
|
|
|
public int radiusClaimFailureLimit = 9;
|
|
|
|
|
2013-04-23 18:07:17 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// HOMES
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public boolean homesEnabled = true;
|
|
|
|
public boolean homesMustBeInClaimedTerritory = true;
|
|
|
|
public boolean homesTeleportCommandEnabled = true;
|
|
|
|
public boolean homesTeleportAllowedFromEnemyTerritory = true;
|
|
|
|
public boolean homesTeleportAllowedFromDifferentWorld = true;
|
|
|
|
public double homesTeleportAllowedEnemyDistance = 32.0;
|
|
|
|
public boolean homesTeleportIgnoreEnemiesIfInOwnTerritory = true;
|
|
|
|
|
2013-04-23 09:17:30 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// DENY COMMANDS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
// commands which will be prevented if the player is a member of a permanent faction
|
|
|
|
public List<String> denyCommandsPermanentFactionMember = new ArrayList<String>();
|
|
|
|
|
|
|
|
// commands which will be prevented when in claimed territory of another faction
|
2013-04-23 12:31:07 +02:00
|
|
|
public Map<Rel, List<String>> denyCommandsTerritoryRelation = MUtil.map(
|
|
|
|
Rel.ENEMY, MUtil.list("home", "sethome", "spawn", "tpahere", "tpaccept", "tpa", "warp"),
|
|
|
|
Rel.NEUTRAL, new ArrayList<String>(),
|
|
|
|
Rel.TRUCE, new ArrayList<String>(),
|
|
|
|
Rel.ALLY, new ArrayList<String>(),
|
|
|
|
Rel.MEMBER, new ArrayList<String>()
|
2013-04-23 09:17:30 +02:00
|
|
|
);
|
2013-04-24 08:39:26 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// INTEGRATION: WORLD GUARD
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public boolean worldGuardChecking = false;
|
2013-04-23 09:17:30 +02:00
|
|
|
|
2013-04-24 07:51:48 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// INTEGRATION: LWC
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2013-04-24 11:30:00 +02:00
|
|
|
public Map<FactionsEventChunkChangeType, Boolean> lwcRemoveOnChange = MUtil.map(
|
|
|
|
FactionsEventChunkChangeType.BUY, false,
|
|
|
|
FactionsEventChunkChangeType.SELL, false,
|
|
|
|
FactionsEventChunkChangeType.CONQUER, false,
|
|
|
|
FactionsEventChunkChangeType.PILLAGE, false
|
|
|
|
);
|
2013-04-24 08:39:26 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// INTEGRATION: ECONOMY
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public boolean econEnabled = false;
|
|
|
|
|
|
|
|
// TODO: Rename to include unit.
|
|
|
|
public double econLandReward = 0.00;
|
|
|
|
|
|
|
|
public String econUniverseAccount = "";
|
|
|
|
|
2013-04-24 11:16:37 +02:00
|
|
|
public Map<FactionsEventChunkChangeType, Double> econChunkCost = MUtil.map(
|
|
|
|
FactionsEventChunkChangeType.BUY, 30.0,
|
|
|
|
FactionsEventChunkChangeType.SELL, -20.0,
|
|
|
|
FactionsEventChunkChangeType.CONQUER, -10.0,
|
|
|
|
FactionsEventChunkChangeType.PILLAGE, -10.0
|
|
|
|
);
|
2013-04-24 08:39:26 +02:00
|
|
|
|
|
|
|
public double econCostCreate = 100.0;
|
|
|
|
public double econCostSethome = 0.0;
|
|
|
|
public double econCostJoin = 0.0;
|
|
|
|
public double econCostLeave = 0.0;
|
|
|
|
public double econCostKick = 0.0;
|
|
|
|
public double econCostInvite = 0.0;
|
|
|
|
public double econCostDeinvite = 0.0;
|
|
|
|
public double econCostHome = 0.0;
|
|
|
|
public double econCostTag = 0.0;
|
|
|
|
public double econCostDescription = 0.0;
|
|
|
|
public double econCostTitle = 0.0;
|
|
|
|
public double econCostOpen = 0.0;
|
|
|
|
|
|
|
|
public Map<Rel, Double> econRelCost = MUtil.map(
|
|
|
|
Rel.ENEMY, 0.0,
|
|
|
|
Rel.ALLY, 0.0,
|
|
|
|
Rel.TRUCE, 0.0,
|
|
|
|
Rel.NEUTRAL, 0.0
|
|
|
|
);
|
|
|
|
|
|
|
|
//Faction banks, to pay for land claiming and other costs instead of individuals paying for them
|
|
|
|
public boolean bankEnabled = true;
|
|
|
|
//public static boolean bankMembersCanWithdraw = false; //Have to be at least moderator to withdraw or pay money to another faction
|
|
|
|
public boolean bankFactionPaysCosts = true; //The faction pays for faction command costs, such as sethome
|
|
|
|
public boolean bankFactionPaysLandCosts = true; //The faction pays for land claiming costs.
|
2013-04-24 07:51:48 +02:00
|
|
|
|
2013-04-22 16:58:22 +02:00
|
|
|
}
|