2013-04-22 09:37:53 +02:00
|
|
|
package com.massivecraft.factions.entity;
|
|
|
|
|
2013-04-24 16:50:19 +02:00
|
|
|
import com.massivecraft.factions.Factions;
|
2014-09-17 13:17:33 +02:00
|
|
|
import com.massivecraft.factions.Rel;
|
2014-10-08 06:38:26 +02:00
|
|
|
import com.massivecraft.factions.engine.EngineChat;
|
2014-09-17 13:17:33 +02:00
|
|
|
import com.massivecraft.factions.event.EventFactionsChunkChangeType;
|
2017-03-23 16:40:32 +01:00
|
|
|
import com.massivecraft.massivecore.collections.BackstringSet;
|
2018-01-19 20:51:07 +01:00
|
|
|
import com.massivecraft.massivecore.collections.MassiveSet;
|
2014-12-19 11:53:59 +01:00
|
|
|
import com.massivecraft.massivecore.collections.WorldExceptionSet;
|
2017-02-27 19:35:09 +01:00
|
|
|
import com.massivecraft.massivecore.command.editor.annotation.EditorName;
|
|
|
|
import com.massivecraft.massivecore.command.editor.annotation.EditorType;
|
|
|
|
import com.massivecraft.massivecore.command.editor.annotation.EditorTypeInner;
|
|
|
|
import com.massivecraft.massivecore.command.type.TypeMillisDiff;
|
2014-06-04 14:02:23 +02:00
|
|
|
import com.massivecraft.massivecore.store.Entity;
|
|
|
|
import com.massivecraft.massivecore.util.MUtil;
|
2014-10-06 13:08:34 +02:00
|
|
|
import com.massivecraft.massivecore.util.TimeUnit;
|
2017-03-24 13:05:58 +01:00
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
import org.bukkit.Material;
|
|
|
|
import org.bukkit.entity.EntityType;
|
|
|
|
import org.bukkit.event.EventPriority;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Set;
|
2013-04-22 09:37:53 +02:00
|
|
|
|
2017-02-22 08:22:08 +01:00
|
|
|
@EditorName("config")
|
2013-04-22 09:37:53 +02:00
|
|
|
public class MConf extends Entity<MConf>
|
|
|
|
{
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// META
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2013-04-22 15:05:00 +02:00
|
|
|
protected static transient MConf i;
|
2013-04-22 16:26:44 +02:00
|
|
|
public static MConf get() { return i; }
|
2013-04-22 09:37:53 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
2013-04-23 12:14:36 +02:00
|
|
|
// OVERRIDE: ENTITY
|
2013-04-22 09:37:53 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2013-04-23 12:14:36 +02:00
|
|
|
@Override
|
|
|
|
public MConf load(MConf that)
|
|
|
|
{
|
|
|
|
super.load(that);
|
|
|
|
|
2017-03-24 19:36:54 +01:00
|
|
|
// Reactivate EngineChat if currently active.
|
|
|
|
// This way some event listeners are registered with the correct priority based on the config.
|
|
|
|
EngineChat engine = EngineChat.get();
|
|
|
|
if (engine.isActive())
|
|
|
|
{
|
|
|
|
engine.setActive(false);
|
|
|
|
engine.setActive(true);
|
|
|
|
}
|
2013-04-23 12:14:36 +02:00
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
2013-04-22 09:41:48 +02:00
|
|
|
|
2017-03-24 15:53:20 +01:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// VERSION
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2019-01-26 15:04:47 +01:00
|
|
|
public int version = 5;
|
2017-03-24 15:53:20 +01:00
|
|
|
|
2013-11-11 09:31:04 +01:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// COMMAND ALIASES
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Don't you want "f" as the base command alias? Simply change it here.
|
2013-11-11 09:31:04 +01:00
|
|
|
public List<String> aliasesF = MUtil.list("f");
|
|
|
|
|
2014-09-17 22:29:33 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// WORLDS FEATURE ENABLED
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Use this blacklist/whitelist system to toggle features on a per world basis.
|
|
|
|
// Do you only want claiming enabled on the one map called "Hurr"?
|
|
|
|
// In such case set standard to false and add "Hurr" as an exeption to worldsClaimingEnabled.
|
2014-09-17 22:29:33 +02:00
|
|
|
public WorldExceptionSet worldsClaimingEnabled = new WorldExceptionSet();
|
|
|
|
public WorldExceptionSet worldsPowerLossEnabled = new WorldExceptionSet();
|
2016-07-01 03:52:10 +02:00
|
|
|
public WorldExceptionSet worldsPowerGainEnabled = new WorldExceptionSet();
|
|
|
|
|
2014-09-17 22:29:33 +02:00
|
|
|
public WorldExceptionSet worldsPvpRulesEnabled = new WorldExceptionSet();
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// DERPY OVERRIDES
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Add player names here who should bypass all protections.
|
|
|
|
// Should /not/ be used for admins. There is "/f adminmode" for that.
|
|
|
|
// This is for other plugins/mods that use a fake player to take actions, which shouldn't be subject to our protections.
|
2018-01-19 20:51:07 +01:00
|
|
|
public Set<String> playersWhoBypassAllProtection = new MassiveSet<>();
|
2014-09-17 22:29:33 +02:00
|
|
|
|
2013-04-22 09:51:19 +02:00
|
|
|
// -------------------------------------------- //
|
2013-04-24 08:39:26 +02:00
|
|
|
// TASKS
|
2013-04-22 09:51:19 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Define the time in minutes between certain Factions system tasks is ran.
|
2013-04-24 08:45:52 +02:00
|
|
|
public double taskPlayerPowerUpdateMinutes = 1;
|
|
|
|
public double taskEconLandRewardMinutes = 20;
|
2013-04-24 08:39:26 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// REMOVE DATA
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Should players be kicked from their faction and their data erased when banned?
|
2014-10-06 13:08:34 +02:00
|
|
|
public boolean removePlayerWhenBanned = true;
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// After how many milliseconds should players be automatically kicked from their faction?
|
|
|
|
|
2014-10-06 13:08:34 +02:00
|
|
|
// The Default
|
2017-02-22 08:22:08 +01:00
|
|
|
@EditorType(TypeMillisDiff.class)
|
2017-07-25 12:12:50 +02:00
|
|
|
public long cleanInactivityToleranceMillis = 10 * TimeUnit.MILLIS_PER_DAY; // 10 days
|
2014-10-06 13:08:34 +02:00
|
|
|
|
|
|
|
// Player Age Bonus
|
2017-02-22 08:22:08 +01:00
|
|
|
@EditorTypeInner({TypeMillisDiff.class, TypeMillisDiff.class})
|
2017-07-25 12:12:50 +02:00
|
|
|
public Map<Long, Long> cleanInactivityToleranceMillisPlayerAgeToBonus = MUtil.map(
|
2014-11-14 08:41:58 +01:00
|
|
|
2 * TimeUnit.MILLIS_PER_WEEK, 10 * TimeUnit.MILLIS_PER_DAY // +10 days after 2 weeks
|
2014-10-06 13:08:34 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
// Faction Age Bonus
|
2017-02-22 08:22:08 +01:00
|
|
|
@EditorTypeInner({TypeMillisDiff.class, TypeMillisDiff.class})
|
2017-07-25 12:12:50 +02:00
|
|
|
public Map<Long, Long> cleanInactivityToleranceMillisFactionAgeToBonus = MUtil.map(
|
2014-11-14 08:41:58 +01:00
|
|
|
4 * TimeUnit.MILLIS_PER_WEEK, 10 * TimeUnit.MILLIS_PER_DAY, // +10 days after 4 weeks
|
|
|
|
2 * TimeUnit.MILLIS_PER_WEEK, 5 * TimeUnit.MILLIS_PER_DAY // +5 days after 2 weeks
|
2014-10-06 13:08:34 +02:00
|
|
|
);
|
2013-04-23 12:14:36 +02:00
|
|
|
|
2014-09-17 13:17:33 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// DEFAULTS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Which faction should new players be followers of?
|
|
|
|
// "none" means Wilderness. Remember to specify the id, like "3defeec7-b3b1-48d9-82bb-2a8903df24e3" and not the name.
|
2014-10-01 22:00:08 +02:00
|
|
|
public String defaultPlayerFactionId = Factions.ID_NONE;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// What power should the player start with?
|
2014-09-17 13:17:33 +02:00
|
|
|
public double defaultPlayerPower = 0.0;
|
2014-10-02 16:12:16 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// MOTD
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// During which event priority should the faction message of the day be displayed?
|
|
|
|
// Choose between: LOWEST, LOW, NORMAL, HIGH, HIGHEST and MONITOR.
|
|
|
|
// This setting only matters if "motdDelayTicks" is set to -1
|
2014-10-02 16:12:16 +02:00
|
|
|
public EventPriority motdPriority = EventPriority.NORMAL;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// How many ticks should we delay the faction message of the day with?
|
|
|
|
// -1 means we don't delay at all. We display it at once.
|
2016-03-16 15:21:20 +01:00
|
|
|
// 0 means it's deferred to the upcoming server tick.
|
2014-11-14 08:41:58 +01:00
|
|
|
// 5 means we delay it yet another 5 ticks.
|
2014-10-02 16:12:16 +02:00
|
|
|
public int motdDelayTicks = -1;
|
2014-09-17 13:17:33 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// POWER
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// What is the maximum player power?
|
2014-09-17 13:17:33 +02:00
|
|
|
public double powerMax = 10.0;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// What is the minimum player power?
|
|
|
|
// NOTE: Negative minimum values is possible.
|
2014-09-17 13:17:33 +02:00
|
|
|
public double powerMin = 0.0;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// How much power should be regained per hour online on the server?
|
2014-09-17 13:17:33 +02:00
|
|
|
public double powerPerHour = 2.0;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// How much power should be lost on death?
|
2014-09-17 13:17:33 +02:00
|
|
|
public double powerPerDeath = -2.0;
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Can players with negative power leave their faction?
|
|
|
|
// NOTE: This only makes sense to set to false if your "powerMin" setting is negative.
|
2014-09-17 13:17:33 +02:00
|
|
|
public boolean canLeaveWithNegativePower = true;
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// CORE
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Is there a maximum amount of members per faction?
|
|
|
|
// 0 means there is not. If you set it to 100 then there can at most be 100 members per faction.
|
2014-09-17 13:17:33 +02:00
|
|
|
public int factionMemberLimit = 0;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// Is there a maximum faction power cap?
|
|
|
|
// 0 means there is not. Set it to a positive value in case you wan't to use this feature.
|
2014-09-17 13:17:33 +02:00
|
|
|
public double factionPowerMax = 0.0;
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Limit the length of faction names here.
|
2014-09-17 13:17:33 +02:00
|
|
|
public int factionNameLengthMin = 3;
|
|
|
|
public int factionNameLengthMax = 16;
|
2019-01-24 11:22:39 +01:00
|
|
|
|
2013-04-24 20:17:20 +02:00
|
|
|
// -------------------------------------------- //
|
2014-10-13 15:14:34 +02:00
|
|
|
// SET LIMITS
|
2013-04-24 20:17:20 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// When using radius setting of faction territory, what is the maximum radius allowed?
|
2014-10-14 08:19:00 +02:00
|
|
|
public int setRadiusMax = 30;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// When using fill setting of faction territory, what is the maximum chunk count allowed?
|
2014-10-13 15:14:34 +02:00
|
|
|
public int setFillMax = 1000;
|
2013-04-24 20:17:20 +02:00
|
|
|
|
2014-09-17 13:17:33 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// CLAIMS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Must claims be connected to each other?
|
|
|
|
// If you set this to false you will allow factions to claim more than one base per world map.
|
|
|
|
// That would makes outposts possible but also potentially ugly weird claims messing up your Dynmap and ingame experiance.
|
2014-09-17 13:17:33 +02:00
|
|
|
public boolean claimsMustBeConnected = true;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// Would you like to allow unconnected claims when conquering land from another faction?
|
|
|
|
// Setting this to true would allow taking over someone elses base even if claims normally have to be connected.
|
|
|
|
// Note that even without this you can pillage/unclaim another factions territory in war.
|
|
|
|
// You just won't be able to take the land as your own.
|
2014-09-17 13:17:33 +02:00
|
|
|
public boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = false;
|
2014-10-07 17:08:40 +02:00
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Is claiming from other factions even allowed?
|
|
|
|
// Set this to false to disable territorial warfare altogether.
|
2014-10-07 17:08:40 +02:00
|
|
|
public boolean claimingFromOthersAllowed = true;
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Is a minimum distance (measured in chunks) to other factions required?
|
|
|
|
// 0 means the feature is disabled.
|
|
|
|
// Set the feature to 10 and there must be 10 chunks of wilderness between factions.
|
|
|
|
// Factions may optionally allow their allies to bypass this limit by configuring their faction permissions ingame themselves.
|
|
|
|
public int claimMinimumChunksDistanceToOthers = 0;
|
2014-10-07 17:08:40 +02:00
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Do you need a minimum amount of faction members to claim land?
|
|
|
|
// 1 means just the faction leader alone is enough.
|
2014-09-17 13:17:33 +02:00
|
|
|
public int claimsRequireMinFactionMembers = 1;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// Is there a maximum limit to chunks claimed?
|
|
|
|
// 0 means there isn't.
|
2014-09-17 13:17:33 +02:00
|
|
|
public int claimedLandsMax = 0;
|
|
|
|
|
2016-04-19 17:57:28 +02:00
|
|
|
// The max amount of worlds in which a player can have claims in.
|
|
|
|
public int claimedWorldsMax = -1;
|
|
|
|
|
2016-03-21 13:30:13 +01:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// PROTECTION
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public boolean protectionLiquidFlowEnabled = true;
|
|
|
|
|
2014-09-17 13:17:33 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// HOMES
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2019-01-26 15:04:47 +01:00
|
|
|
// Is the warps feature enabled?
|
|
|
|
// If you set this to false players can't set warps or teleport to a warp.
|
|
|
|
public boolean warpsEnabled = true;
|
|
|
|
|
|
|
|
// How many warps can they have?
|
|
|
|
public int warpsMax = 1;
|
|
|
|
|
|
|
|
// Must warps be located inside the faction's territory?
|
2014-11-14 08:41:58 +01:00
|
|
|
// It's usually a wise idea keeping this true.
|
2019-01-26 15:04:47 +01:00
|
|
|
// Otherwise players can set their warps inside enemy territory.
|
|
|
|
public boolean warpsMustBeInClaimedTerritory = true;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
2019-01-26 15:04:47 +01:00
|
|
|
// These options can be used to limit rights to warp under different circumstances.
|
|
|
|
public boolean warpsTeleportAllowedFromEnemyTerritory = true;
|
|
|
|
public boolean warpsTeleportAllowedFromDifferentWorld = true;
|
|
|
|
public double warpsTeleportAllowedEnemyDistance = 32.0;
|
|
|
|
public boolean warpsTeleportIgnoreEnemiesIfInOwnTerritory = true;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
2019-01-26 15:04:47 +01:00
|
|
|
// Should players teleport to faction warp on death?
|
2014-11-14 08:41:58 +01:00
|
|
|
// Set this to true to override the default respawn location.
|
2019-01-26 15:04:47 +01:00
|
|
|
public boolean warpsTeleportToOnDeathActive = false;
|
|
|
|
|
|
|
|
// And waht faction warp should it be? It must have a specific name.
|
|
|
|
public String warpsTeleportToOnDeathName = "home";
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// This value can be used to tweak compatibility with other plugins altering the respawn location.
|
|
|
|
// Choose between: LOWEST, LOW, NORMAL, HIGH, HIGHEST and MONITOR.
|
2019-01-26 15:04:47 +01:00
|
|
|
public EventPriority warpsTeleportToOnDeathPriority = EventPriority.NORMAL;
|
2018-12-20 01:35:30 +01:00
|
|
|
|
2015-02-02 23:33:19 +01:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// TERRITORY INFO
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2015-08-28 09:00:24 +02:00
|
|
|
public boolean territoryInfoTitlesDefault = true;
|
2015-02-02 23:33:19 +01:00
|
|
|
|
2015-08-28 09:00:24 +02:00
|
|
|
public String territoryInfoTitlesMain = "{relcolor}{name}";
|
|
|
|
public String territoryInfoTitlesSub = "<i>{desc}";
|
|
|
|
public int territoryInfoTitlesTicksIn = 5;
|
|
|
|
public int territoryInfoTitlesTicksStay = 60;
|
|
|
|
public int territoryInfoTitleTicksOut = 5;
|
2015-02-02 23:33:19 +01:00
|
|
|
|
|
|
|
public String territoryInfoChat = "<i> ~ {relcolor}{name} <i>{desc}";
|
|
|
|
|
2014-09-17 13:17:33 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// ASSORTED
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Set this to true if want to block the promotion of new leaders for permanent factions.
|
|
|
|
// I don't really understand the user case for this option.
|
2014-09-17 13:17:33 +02:00
|
|
|
public boolean permanentFactionsDisableLeaderPromotion = false;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// How much health damage should a player take upon placing or breaking a block in a "pain build" territory?
|
|
|
|
// 2.0 means one heart.
|
2014-09-17 13:17:33 +02:00
|
|
|
public double actionDeniedPainAmount = 2.0D;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// If you set this option to true then factionless players cant partake in PVP.
|
|
|
|
// It works in both directions. Meaning you must join a faction to hurt players and get hurt by players.
|
2014-09-17 13:17:33 +02:00
|
|
|
public boolean disablePVPForFactionlessPlayers = false;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
2016-06-17 12:48:05 +02:00
|
|
|
// If you set this option to true then factionless players cant damage each other.
|
|
|
|
// So two factionless can't PvP, but they can PvP with others if that is allowed.
|
|
|
|
public boolean enablePVPBetweenFactionlessPlayers = true;
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Set this option to true to create an exception to the rule above.
|
|
|
|
// Players inside their own faction territory can then hurt facitonless players.
|
|
|
|
// This way you may "evict" factionless trolls messing around in your home base.
|
2014-09-17 13:17:33 +02:00
|
|
|
public boolean enablePVPAgainstFactionlessInAttackersLand = false;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// Inside your own faction territory you take less damage.
|
|
|
|
// 0.1 means that you take 10% less damage at home.
|
2014-10-14 10:33:05 +02:00
|
|
|
public double territoryShieldFactor = 0.1D;
|
2014-09-17 13:17:33 +02:00
|
|
|
|
2015-01-24 04:43:28 +01:00
|
|
|
// Protects the faction land from piston extending/retracting
|
|
|
|
// through the denying of MPerm build
|
|
|
|
public boolean handlePistonProtectionThroughDenyBuild = true;
|
2019-01-19 12:21:28 +01:00
|
|
|
|
|
|
|
// Make faction disbanding a confirmation thing
|
|
|
|
public boolean requireConfirmationForFactionDisbanding = true;
|
2015-01-24 04:43:28 +01:00
|
|
|
|
2014-09-17 13:17:33 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// DENY COMMANDS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// A list of commands to block for members of permanent factions.
|
|
|
|
// I don't really understand the user case for this option.
|
2017-03-24 14:03:29 +01:00
|
|
|
public List<String> denyCommandsPermanentFactionMember = new ArrayList<>();
|
2014-09-17 13:17:33 +02:00
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Lists of commands to deny depending on your relation to the current faction territory.
|
|
|
|
// You may for example not type /home (might be the plugin Essentials) in the territory of your enemies.
|
2014-09-17 13:17:33 +02:00
|
|
|
public Map<Rel, List<String>> denyCommandsTerritoryRelation = MUtil.map(
|
|
|
|
Rel.ENEMY, MUtil.list(
|
|
|
|
// Essentials commands
|
|
|
|
"home",
|
|
|
|
"homes",
|
|
|
|
"sethome",
|
|
|
|
"createhome",
|
|
|
|
"tpahere",
|
|
|
|
"tpaccept",
|
|
|
|
"tpyes",
|
|
|
|
"tpa",
|
|
|
|
"call",
|
|
|
|
"tpask",
|
|
|
|
"warp",
|
|
|
|
"warps",
|
|
|
|
"spawn",
|
|
|
|
// Essentials e-alliases
|
|
|
|
"ehome",
|
|
|
|
"ehomes",
|
|
|
|
"esethome",
|
|
|
|
"ecreatehome",
|
|
|
|
"etpahere",
|
|
|
|
"etpaccept",
|
|
|
|
"etpyes",
|
|
|
|
"etpa",
|
|
|
|
"ecall",
|
|
|
|
"etpask",
|
|
|
|
"ewarp",
|
|
|
|
"ewarps",
|
|
|
|
"espawn",
|
|
|
|
// Essentials fallback alliases
|
|
|
|
"essentials:home",
|
|
|
|
"essentials:homes",
|
|
|
|
"essentials:sethome",
|
|
|
|
"essentials:createhome",
|
|
|
|
"essentials:tpahere",
|
|
|
|
"essentials:tpaccept",
|
|
|
|
"essentials:tpyes",
|
|
|
|
"essentials:tpa",
|
|
|
|
"essentials:call",
|
|
|
|
"essentials:tpask",
|
|
|
|
"essentials:warp",
|
|
|
|
"essentials:warps",
|
|
|
|
"essentials:spawn",
|
|
|
|
// Other plugins
|
|
|
|
"wtp",
|
|
|
|
"uspawn",
|
|
|
|
"utp",
|
|
|
|
"mspawn",
|
|
|
|
"mtp",
|
|
|
|
"fspawn",
|
|
|
|
"ftp",
|
|
|
|
"jspawn",
|
|
|
|
"jtp"
|
|
|
|
),
|
|
|
|
Rel.NEUTRAL, new ArrayList<String>(),
|
|
|
|
Rel.TRUCE, new ArrayList<String>(),
|
|
|
|
Rel.ALLY, new ArrayList<String>(),
|
2018-12-20 01:35:30 +01:00
|
|
|
Rel.FACTION, new ArrayList<String>()
|
2014-09-17 13:17:33 +02:00
|
|
|
);
|
|
|
|
|
2016-09-13 03:54:20 +02:00
|
|
|
// The distance for denying the following commands. Set to -1 to disable.
|
|
|
|
public double denyCommandsDistance = -1;
|
|
|
|
|
|
|
|
// Lists of commands to deny depending on your relation to a nearby enemy in the above distance.
|
|
|
|
public Map<Rel, List<String>> denyCommandsDistanceRelation = MUtil.map(
|
|
|
|
Rel.ENEMY, MUtil.list(
|
|
|
|
"home"
|
|
|
|
),
|
|
|
|
Rel.NEUTRAL, new ArrayList<String>(),
|
|
|
|
Rel.TRUCE, new ArrayList<String>(),
|
|
|
|
Rel.ALLY, new ArrayList<String>(),
|
2018-12-20 01:35:30 +01:00
|
|
|
Rel.FACTION, new ArrayList<String>()
|
2016-09-13 03:54:20 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
// Allow bypassing the above setting when in these territories.
|
|
|
|
public List<Rel> denyCommandsDistanceBypassIn = MUtil.list(
|
2018-12-20 01:35:30 +01:00
|
|
|
Rel.FACTION,
|
2016-09-13 03:54:20 +02:00
|
|
|
Rel.ALLY
|
|
|
|
);
|
|
|
|
|
2013-04-22 09:51:19 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// CHAT
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Should Factions set the chat format?
|
|
|
|
// This should be kept at false if you use an external chat format plugin.
|
|
|
|
// If you are planning on running a more lightweight server you can set this to true.
|
2014-11-17 11:14:09 +01:00
|
|
|
public boolean chatSetFormat = true;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// At which event priority should the chat format be set in such case?
|
|
|
|
// Choose between: LOWEST, LOW, NORMAL, HIGH and HIGHEST.
|
2013-04-22 09:51:19 +02:00
|
|
|
public EventPriority chatSetFormatAt = EventPriority.LOWEST;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// What format should be set?
|
2013-04-24 19:01:17 +02:00
|
|
|
public String chatSetFormatTo = "<{factions_relcolor}§l{factions_roleprefix}§r{factions_relcolor}{factions_name|rp}§f%1$s> %2$s";
|
2013-04-22 09:51:19 +02:00
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Should the chat tags such as {factions_name} be parsed?
|
|
|
|
// NOTE: You can set this to true even with chatSetFormat = false.
|
|
|
|
// But in such case you must set the chat format using an external chat format plugin.
|
2013-04-22 09:51:19 +02:00
|
|
|
public boolean chatParseTags = true;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// At which event priority should the faction chat tags be parsed in such case?
|
|
|
|
// Choose between: LOWEST, LOW, NORMAL, HIGH, HIGHEST.
|
2013-04-22 09:51:19 +02:00
|
|
|
public EventPriority chatParseTagsAt = EventPriority.LOW;
|
|
|
|
|
2013-04-22 10:05:03 +02:00
|
|
|
// -------------------------------------------- //
|
2013-04-23 12:14:36 +02:00
|
|
|
// COLORS
|
2013-04-22 10:05:03 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Here you can alter the colors tied to certain faction relations and settings.
|
|
|
|
// You probably don't want to edit these to much.
|
|
|
|
// Doing so might confuse players that are used to Factions.
|
2013-04-23 12:14:36 +02:00
|
|
|
public ChatColor colorMember = ChatColor.GREEN;
|
|
|
|
public ChatColor colorAlly = ChatColor.DARK_PURPLE;
|
|
|
|
public ChatColor colorTruce = ChatColor.LIGHT_PURPLE;
|
|
|
|
public ChatColor colorNeutral = ChatColor.WHITE;
|
|
|
|
public ChatColor colorEnemy = ChatColor.RED;
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// This one is for example applied to SafeZone since that faction has the pvp flag set to false.
|
2013-04-23 12:14:36 +02:00
|
|
|
public ChatColor colorNoPVP = ChatColor.GOLD;
|
2014-11-14 08:41:58 +01:00
|
|
|
|
|
|
|
// This one is for example applied to WarZone since that faction has the friendly fire flag set to true.
|
2013-04-23 12:14:36 +02:00
|
|
|
public ChatColor colorFriendlyFire = ChatColor.DARK_RED;
|
2019-01-19 12:21:28 +01:00
|
|
|
|
2013-04-23 12:14:36 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// EXPLOITS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public boolean handleExploitObsidianGenerators = true;
|
|
|
|
public boolean handleExploitEnderPearlClipping = true;
|
2015-10-26 02:09:03 +01:00
|
|
|
public boolean handleNetherPortalTrap = true;
|
2013-04-23 12:14:36 +02:00
|
|
|
|
2015-08-28 10:42:40 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// UNSTUCK
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public int unstuckSeconds = 30;
|
|
|
|
public int unstuckChunkRadius = 10;
|
|
|
|
|
2013-04-23 12:14:36 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// LOGGING
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-14 08:41:58 +01:00
|
|
|
// Here you can disable logging of certain events to the server console.
|
|
|
|
|
2013-04-23 12:14:36 +02:00
|
|
|
public boolean logFactionCreate = true;
|
|
|
|
public boolean logFactionDisband = true;
|
|
|
|
public boolean logFactionJoin = true;
|
|
|
|
public boolean logFactionKick = true;
|
|
|
|
public boolean logFactionLeave = true;
|
|
|
|
public boolean logLandClaims = true;
|
|
|
|
public boolean logMoneyTransactions = true;
|
2013-08-23 10:14:23 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// ENUMERATIONS
|
|
|
|
// -------------------------------------------- //
|
2017-03-24 15:07:59 +01:00
|
|
|
// In this configuration section you can add support for Forge mods that add new Materials and EntityTypes.
|
2014-11-14 08:41:58 +01:00
|
|
|
// This way they can be protected in Faction territory.
|
2017-03-24 15:07:59 +01:00
|
|
|
// Use the "UPPER_CASE_NAME" for the Material or EntityType in question.
|
|
|
|
// If you are running a regular Spigot server you don't have to edit this section.
|
|
|
|
// In fact all of these sets can be empty on regular Spigot servers without any risk.
|
2014-11-14 08:41:58 +01:00
|
|
|
|
2014-12-19 11:50:28 +01:00
|
|
|
// Interacting with these materials when they are already placed in the terrain results in an edit.
|
2017-03-24 15:07:59 +01:00
|
|
|
public BackstringSet<Material> materialsEditOnInteract = new BackstringSet<>(Material.class);
|
2013-08-23 10:14:23 +02:00
|
|
|
|
2014-12-19 11:50:28 +01:00
|
|
|
// Interacting with the the terrain holding this item in hand results in an edit.
|
|
|
|
// There's no need to add all block materials here. Only special items other than blocks.
|
2017-03-24 15:07:59 +01:00
|
|
|
public BackstringSet<Material> materialsEditTools = new BackstringSet<>(Material.class);
|
2014-10-03 12:52:46 +02:00
|
|
|
|
2014-12-19 11:50:28 +01:00
|
|
|
// Interacting with these materials placed in the terrain results in door toggling.
|
2017-03-24 15:07:59 +01:00
|
|
|
public BackstringSet<Material> materialsDoor = new BackstringSet<>(Material.class);
|
2013-08-23 10:14:23 +02:00
|
|
|
|
2014-12-19 11:50:28 +01:00
|
|
|
// Interacting with these materials placed in the terrain results in opening a container.
|
2017-03-24 15:07:59 +01:00
|
|
|
public BackstringSet<Material> materialsContainer = new BackstringSet<>(Material.class);
|
2013-08-23 10:14:23 +02:00
|
|
|
|
2014-12-19 11:50:28 +01:00
|
|
|
// Interacting with these entities results in an edit.
|
2017-03-24 15:07:59 +01:00
|
|
|
public BackstringSet<EntityType> entityTypesEditOnInteract = new BackstringSet<>(EntityType.class);
|
2014-12-19 11:50:28 +01:00
|
|
|
|
|
|
|
// Damaging these entities results in an edit.
|
2017-03-24 15:07:59 +01:00
|
|
|
public BackstringSet<EntityType> entityTypesEditOnDamage = new BackstringSet<>(EntityType.class);
|
2014-12-19 11:50:28 +01:00
|
|
|
|
|
|
|
// Interacting with these entities results in opening a container.
|
2017-03-24 15:07:59 +01:00
|
|
|
public BackstringSet<EntityType> entityTypesContainer = new BackstringSet<>(EntityType.class);
|
2014-10-03 13:16:07 +02:00
|
|
|
|
2014-12-19 11:50:28 +01:00
|
|
|
// The complete list of entities considered to be monsters.
|
2017-03-24 15:07:59 +01:00
|
|
|
public BackstringSet<EntityType> entityTypesMonsters = new BackstringSet<>(EntityType.class);
|
2014-08-21 00:38:01 +02:00
|
|
|
|
2015-09-08 05:06:57 +02:00
|
|
|
// List of entities considered to be animals.
|
2017-03-24 15:07:59 +01:00
|
|
|
public BackstringSet<EntityType> entityTypesAnimals = new BackstringSet<>(EntityType.class);
|
2018-12-20 01:35:30 +01:00
|
|
|
|
2014-09-17 13:17:33 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// INTEGRATION: LWC
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-17 11:14:09 +01:00
|
|
|
// Do you need faction build rights in the territory to create an LWC protection there?
|
2014-10-03 11:23:54 +02:00
|
|
|
public boolean lwcMustHaveBuildRightsToCreate = true;
|
2014-11-17 11:14:09 +01:00
|
|
|
|
|
|
|
// The config option above does not handle situations where a player creates an LWC protection in Faction territory and then leaves the faction.
|
|
|
|
// The player would then have an LWC protection in a territory where they can not build.
|
|
|
|
// Set this config option to true to enable an automatic removal feature.
|
|
|
|
// LWC protections that couldn't be created will be removed on an attempt to open them by any player.
|
2014-10-03 11:23:54 +02:00
|
|
|
public boolean lwcRemoveIfNoBuildRights = false;
|
|
|
|
|
2014-11-17 11:14:09 +01:00
|
|
|
// WARN: Experimental and semi buggy.
|
|
|
|
// If you change this to true: alien LWC protections will be removed upon using /f set.
|
2014-09-17 13:17:33 +02:00
|
|
|
public Map<EventFactionsChunkChangeType, Boolean> lwcRemoveOnChange = MUtil.map(
|
2014-11-17 11:14:09 +01:00
|
|
|
EventFactionsChunkChangeType.BUY, false, // when claiming from wilderness
|
|
|
|
EventFactionsChunkChangeType.SELL, false, // when selling back to wilderness
|
|
|
|
EventFactionsChunkChangeType.CONQUER, false, // when claiming from another player faction
|
|
|
|
EventFactionsChunkChangeType.PILLAGE, false // when unclaiming (to wilderness) from another player faction
|
2014-09-17 13:17:33 +02:00
|
|
|
);
|
|
|
|
|
2015-09-05 12:58:15 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// INTEGRATION: WorldGuard
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
// Global WorldGuard Integration Switch
|
|
|
|
public boolean worldguardCheckEnabled = false;
|
|
|
|
|
|
|
|
// Enable the WorldGuard check per-world
|
|
|
|
// Specify which worlds the WorldGuard Check can be used in
|
|
|
|
public WorldExceptionSet worldguardCheckWorldsEnabled = new WorldExceptionSet();
|
2019-01-25 15:52:52 +01:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// INTEGRATION: VentureChat
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public String ventureChatFactionChannelName = "faction";
|
|
|
|
public String ventureChatAllyChannelName = "ally";
|
|
|
|
public boolean ventureChatAllowFactionchatBetweenFactionless = false;
|
|
|
|
|
2014-09-17 13:17:33 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// INTEGRATION: ECONOMY
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-17 11:14:09 +01:00
|
|
|
// Should economy features be enabled?
|
|
|
|
// This requires that you have the external plugin called "Vault" installed.
|
|
|
|
public boolean econEnabled = true;
|
2014-09-17 13:17:33 +02:00
|
|
|
|
2014-11-17 11:14:09 +01:00
|
|
|
// A money reward per chunk. This reward is divided among the players in the faction.
|
|
|
|
// You set the time inbetween each reward almost at the top of this config file. (taskEconLandRewardMinutes)
|
2014-09-17 13:17:33 +02:00
|
|
|
public double econLandReward = 0.00;
|
|
|
|
|
2014-11-17 11:14:09 +01:00
|
|
|
// When paying a cost you may specify an account that should receive the money here.
|
|
|
|
// Per default "" the money is just destroyed.
|
2014-09-17 13:17:33 +02:00
|
|
|
public String econUniverseAccount = "";
|
|
|
|
|
2014-11-17 11:14:09 +01:00
|
|
|
// What is the price per chunk when using /f set?
|
2014-09-17 13:17:33 +02:00
|
|
|
public Map<EventFactionsChunkChangeType, Double> econChunkCost = MUtil.map(
|
2014-11-17 11:14:09 +01:00
|
|
|
EventFactionsChunkChangeType.BUY, 1.0, // when claiming from wilderness
|
|
|
|
EventFactionsChunkChangeType.SELL, 0.0, // when selling back to wilderness
|
|
|
|
EventFactionsChunkChangeType.CONQUER, 0.0, // when claiming from another player faction
|
|
|
|
EventFactionsChunkChangeType.PILLAGE, 0.0 // when unclaiming (to wilderness) from another player faction
|
2014-09-17 13:17:33 +02:00
|
|
|
);
|
|
|
|
|
2014-11-17 11:14:09 +01:00
|
|
|
// What is the price to create a faction?
|
|
|
|
public double econCostCreate = 100.0;
|
|
|
|
|
|
|
|
// And so on and so forth ... you get the idea.
|
2019-01-26 15:04:47 +01:00
|
|
|
@Deprecated public double econCostSethome = 0.0;
|
|
|
|
public double econCostWarpAdd = 0.0;
|
|
|
|
public double econCostWarpRemove = 0.0;
|
2014-09-17 13:17:33 +02:00
|
|
|
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;
|
2019-01-26 15:04:47 +01:00
|
|
|
@Deprecated public double econCostHome = 0.0;
|
|
|
|
public double econCostWarpGo = 0.0;
|
2014-09-17 13:17:33 +02:00
|
|
|
public double econCostName = 0.0;
|
|
|
|
public double econCostDescription = 0.0;
|
|
|
|
public double econCostTitle = 0.0;
|
2014-10-02 11:45:06 +02:00
|
|
|
public double econCostFlag = 0.0;
|
2014-09-17 13:17:33 +02:00
|
|
|
|
|
|
|
public Map<Rel, Double> econRelCost = MUtil.map(
|
|
|
|
Rel.ENEMY, 0.0,
|
|
|
|
Rel.ALLY, 0.0,
|
|
|
|
Rel.TRUCE, 0.0,
|
|
|
|
Rel.NEUTRAL, 0.0
|
|
|
|
);
|
|
|
|
|
2014-11-17 11:14:09 +01:00
|
|
|
// Should the faction bank system be enabled?
|
|
|
|
// This enables the command /f money.
|
2014-09-17 13:17:33 +02:00
|
|
|
public boolean bankEnabled = true;
|
2014-11-17 11:14:09 +01:00
|
|
|
|
|
|
|
// That costs should the faciton bank take care of?
|
|
|
|
// If you set this to false the player executing the command will pay instead.
|
|
|
|
public boolean bankFactionPaysCosts = true;
|
2013-04-22 09:37:53 +02:00
|
|
|
|
2014-12-09 04:18:56 +01:00
|
|
|
}
|