2011-07-18 22:06:02 +02:00
|
|
|
package com.massivecraft.factions;
|
2011-02-06 13:36:11 +01:00
|
|
|
|
|
|
|
import java.util.*;
|
2011-10-09 14:53:38 +02:00
|
|
|
|
2013-04-10 10:53:53 +02:00
|
|
|
import com.massivecraft.mcore.SimpleConfig;
|
2013-04-10 11:07:47 +02:00
|
|
|
import com.massivecraft.mcore.util.MUtil;
|
2011-10-23 20:50:49 +02:00
|
|
|
|
2013-04-10 10:53:53 +02:00
|
|
|
public class ConfServer extends SimpleConfig
|
2011-10-08 22:03:44 +02:00
|
|
|
{
|
2013-04-09 13:18:05 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// INSTANCE & CONSTRUCT
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
private static transient ConfServer i = new ConfServer();
|
|
|
|
public static ConfServer get() { return i; }
|
2013-04-10 10:53:53 +02:00
|
|
|
public ConfServer() { super(Factions.get()); }
|
2013-04-09 13:18:05 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
2013-04-18 14:57:56 +02:00
|
|
|
// CORE
|
2013-04-09 13:18:05 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2013-04-11 08:49:14 +02:00
|
|
|
public static List<String> baseCommandAliases = MUtil.list("f");
|
|
|
|
public static String dburi = "default";
|
2011-10-09 14:53:38 +02:00
|
|
|
|
2013-04-18 14:57:56 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// AUTO LEAVE
|
|
|
|
// -------------------------------------------- //
|
2012-11-10 01:22:39 +01:00
|
|
|
|
2011-10-14 23:45:39 +02:00
|
|
|
public static double autoLeaveAfterDaysOfInactivity = 10.0;
|
2012-02-26 23:55:58 +01:00
|
|
|
public static double autoLeaveRoutineRunsEveryXMinutes = 5.0;
|
2011-12-18 09:37:40 +01:00
|
|
|
public static boolean removePlayerDataWhenBanned = true;
|
2013-04-18 14:57:56 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// HOMES
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2011-03-23 17:39:56 +01:00
|
|
|
public static boolean homesEnabled = true;
|
2011-06-19 10:56:21 +02:00
|
|
|
public static boolean homesMustBeInClaimedTerritory = true;
|
2011-06-29 01:29:14 +02:00
|
|
|
public static boolean homesTeleportCommandEnabled = true;
|
2011-06-19 10:56:21 +02:00
|
|
|
public static boolean homesTeleportAllowedFromEnemyTerritory = true;
|
2011-07-09 14:21:47 +02:00
|
|
|
public static boolean homesTeleportAllowedFromDifferentWorld = true;
|
Added basic support for iConomy, where most Factions commands can be made to cost (or give) money. For claiming land, there are some extra features. Each additional land claimed by default costs more than the last, with the multiplier being configurable. For example, the first claim might cost $30, the 2nd $45, the third $60, and so forth. When land is claimed from a weakened faction, there is a configurable bonus amount of money deducted from the cost of claiming the land, as an incentive; this number can be changed to a negative value to instead make it cost more to claim such land. When land is unclaimed, a configurable percentage of the cost of claiming the land can be refunded (defaults to 70% of the cost). The total value of a faction's claimed land is now shown in the info given by /f who [faction tag], along with the depreciated (refund) value.
2011-08-02 01:05:01 +02:00
|
|
|
public static double homesTeleportAllowedEnemyDistance = 32.0;
|
2011-07-20 22:45:36 +02:00
|
|
|
public static boolean homesTeleportIgnoreEnemiesIfInOwnTerritory = true;
|
2011-06-21 04:15:41 +02:00
|
|
|
|
2013-04-23 09:17:30 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// PVP
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2011-06-19 10:49:46 +02:00
|
|
|
public static boolean disablePVPForFactionlessPlayers = false;
|
2011-08-12 17:08:11 +02:00
|
|
|
public static boolean enablePVPAgainstFactionlessInAttackersLand = false;
|
2013-04-23 09:17:30 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// ASSORTED
|
|
|
|
// -------------------------------------------- //
|
2011-06-21 04:15:41 +02:00
|
|
|
|
2012-01-19 04:21:26 +01:00
|
|
|
public static boolean permanentFactionsDisableLeaderPromotion = false;
|
|
|
|
|
2013-04-23 09:17:30 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// CLAIMS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2011-06-21 04:15:41 +02:00
|
|
|
public static boolean claimsMustBeConnected = false;
|
2012-07-30 23:28:23 +02:00
|
|
|
public static boolean claimingFromOthersAllowed = true;
|
2011-07-20 21:45:18 +02:00
|
|
|
public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true;
|
2011-07-25 20:16:32 +02:00
|
|
|
public static int claimsRequireMinFactionMembers = 1;
|
2012-01-31 23:30:24 +01:00
|
|
|
public static int claimedLandsMax = 0;
|
2012-03-13 11:54:48 +01:00
|
|
|
|
|
|
|
// if someone is doing a radius claim and the process fails to claim land this many times in a row, it will exit
|
|
|
|
public static int radiusClaimFailureLimit = 9;
|
|
|
|
|
2011-10-24 03:02:25 +02:00
|
|
|
//public static double considerFactionsReallyOfflineAfterXMinutes = 0.0;
|
2011-06-21 07:20:36 +02:00
|
|
|
|
2013-04-23 09:17:30 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// ASSORTED
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2011-10-24 01:37:51 +02:00
|
|
|
public static int actionDeniedPainAmount = 2;
|
2013-04-23 09:17:30 +02:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// ASSORTED
|
|
|
|
// -------------------------------------------- //
|
2011-08-04 07:07:38 +02:00
|
|
|
|
2013-04-23 12:14:36 +02:00
|
|
|
// TODO: Should this be based on a permission node lookup map?
|
2011-06-02 01:32:09 +02:00
|
|
|
public static double territoryShieldFactor = 0.3;
|
2011-07-20 19:22:03 +02:00
|
|
|
|
2011-08-23 06:31:37 +02:00
|
|
|
// for claimed areas where further faction-member ownership can be defined
|
|
|
|
|
2013-04-23 09:17:30 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// ASSORTED
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2013-04-10 12:52:22 +02:00
|
|
|
public static boolean pistonProtectionThroughDenyBuild = true;
|
Added basic support for iConomy, where most Factions commands can be made to cost (or give) money. For claiming land, there are some extra features. Each additional land claimed by default costs more than the last, with the multiplier being configurable. For example, the first claim might cost $30, the 2nd $45, the third $60, and so forth. When land is claimed from a weakened faction, there is a configurable bonus amount of money deducted from the cost of claiming the land, as an incentive; this number can be changed to a negative value to instead make it cost more to claim such land. When land is unclaimed, a configurable percentage of the cost of claiming the land can be refunded (defaults to 70% of the cost). The total value of a faction's claimed land is now shown in the info given by /f who [faction tag], along with the depreciated (refund) value.
2011-08-02 01:05:01 +02:00
|
|
|
|
2013-04-22 10:37:04 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// INTEGRATION: WORLD GUARD
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public static boolean worldGuardChecking = false;
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// INTEGRATION: LWC
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public static boolean onUnclaimResetLwcLocks = false;
|
|
|
|
public static boolean onCaptureResetLwcLocks = false;
|
|
|
|
|
2013-04-18 14:57:56 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// INTEGRATION: ECONOMY
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2011-10-12 17:25:01 +02:00
|
|
|
public static boolean econEnabled = false;
|
|
|
|
public static String econUniverseAccount = "";
|
2013-04-19 15:01:53 +02:00
|
|
|
|
Added basic support for iConomy, where most Factions commands can be made to cost (or give) money. For claiming land, there are some extra features. Each additional land claimed by default costs more than the last, with the multiplier being configurable. For example, the first claim might cost $30, the 2nd $45, the third $60, and so forth. When land is claimed from a weakened faction, there is a configurable bonus amount of money deducted from the cost of claiming the land, as an incentive; this number can be changed to a negative value to instead make it cost more to claim such land. When land is unclaimed, a configurable percentage of the cost of claiming the land can be refunded (defaults to 70% of the cost). The total value of a faction's claimed land is now shown in the info given by /f who [faction tag], along with the depreciated (refund) value.
2011-08-02 01:05:01 +02:00
|
|
|
public static double econCostClaimWilderness = 30.0;
|
|
|
|
public static double econCostClaimFromFactionBonus = 30.0;
|
|
|
|
public static double econClaimAdditionalMultiplier = 0.5;
|
|
|
|
public static double econClaimRefundMultiplier = 0.7;
|
2012-01-19 04:10:40 +01:00
|
|
|
public static double econClaimUnconnectedFee = 0.0;
|
2013-04-19 15:01:53 +02:00
|
|
|
|
Added basic support for iConomy, where most Factions commands can be made to cost (or give) money. For claiming land, there are some extra features. Each additional land claimed by default costs more than the last, with the multiplier being configurable. For example, the first claim might cost $30, the 2nd $45, the third $60, and so forth. When land is claimed from a weakened faction, there is a configurable bonus amount of money deducted from the cost of claiming the land, as an incentive; this number can be changed to a negative value to instead make it cost more to claim such land. When land is unclaimed, a configurable percentage of the cost of claiming the land can be refunded (defaults to 70% of the cost). The total value of a faction's claimed land is now shown in the info given by /f who [faction tag], along with the depreciated (refund) value.
2011-08-02 01:05:01 +02:00
|
|
|
public static double econCostCreate = 100.0;
|
|
|
|
public static double econCostSethome = 30.0;
|
|
|
|
public static double econCostJoin = 0.0;
|
|
|
|
public static double econCostLeave = 0.0;
|
|
|
|
public static double econCostKick = 0.0;
|
|
|
|
public static double econCostInvite = 0.0;
|
2013-04-19 12:27:39 +02:00
|
|
|
public static double econCostDeinvite = 0.0;
|
Added basic support for iConomy, where most Factions commands can be made to cost (or give) money. For claiming land, there are some extra features. Each additional land claimed by default costs more than the last, with the multiplier being configurable. For example, the first claim might cost $30, the 2nd $45, the third $60, and so forth. When land is claimed from a weakened faction, there is a configurable bonus amount of money deducted from the cost of claiming the land, as an incentive; this number can be changed to a negative value to instead make it cost more to claim such land. When land is unclaimed, a configurable percentage of the cost of claiming the land can be refunded (defaults to 70% of the cost). The total value of a faction's claimed land is now shown in the info given by /f who [faction tag], along with the depreciated (refund) value.
2011-08-02 01:05:01 +02:00
|
|
|
public static double econCostHome = 0.0;
|
|
|
|
public static double econCostTag = 0.0;
|
2013-04-19 12:27:39 +02:00
|
|
|
public static double econCostDescription = 0.0;
|
Added basic support for iConomy, where most Factions commands can be made to cost (or give) money. For claiming land, there are some extra features. Each additional land claimed by default costs more than the last, with the multiplier being configurable. For example, the first claim might cost $30, the 2nd $45, the third $60, and so forth. When land is claimed from a weakened faction, there is a configurable bonus amount of money deducted from the cost of claiming the land, as an incentive; this number can be changed to a negative value to instead make it cost more to claim such land. When land is unclaimed, a configurable percentage of the cost of claiming the land can be refunded (defaults to 70% of the cost). The total value of a faction's claimed land is now shown in the info given by /f who [faction tag], along with the depreciated (refund) value.
2011-08-02 01:05:01 +02:00
|
|
|
public static double econCostTitle = 0.0;
|
|
|
|
public static double econCostOpen = 0.0;
|
|
|
|
public static double econCostAlly = 0.0;
|
2011-10-24 11:07:06 +02:00
|
|
|
public static double econCostTruce = 0.0;
|
Added basic support for iConomy, where most Factions commands can be made to cost (or give) money. For claiming land, there are some extra features. Each additional land claimed by default costs more than the last, with the multiplier being configurable. For example, the first claim might cost $30, the 2nd $45, the third $60, and so forth. When land is claimed from a weakened faction, there is a configurable bonus amount of money deducted from the cost of claiming the land, as an incentive; this number can be changed to a negative value to instead make it cost more to claim such land. When land is unclaimed, a configurable percentage of the cost of claiming the land can be refunded (defaults to 70% of the cost). The total value of a faction's claimed land is now shown in the info given by /f who [faction tag], along with the depreciated (refund) value.
2011-08-02 01:05:01 +02:00
|
|
|
public static double econCostNeutral = 0.0;
|
2011-10-24 11:07:06 +02:00
|
|
|
public static double econCostEnemy = 0.0;
|
2012-11-28 06:51:37 +01:00
|
|
|
|
2013-04-18 14:57:56 +02:00
|
|
|
public static int econLandRewardTaskRunsEveryXMinutes = 20;
|
2013-01-27 02:59:00 +01:00
|
|
|
public static double econLandReward = 0.00;
|
2011-03-23 17:39:56 +01:00
|
|
|
|
Some tweaking of the faction bank code...
The new help page with bank related commands will now only be shown if banks are enabled and the Economy is enabled and hooked in.
Shortened a couple of command descriptions to fit on one line.
Made Deposit, Pay, and Withdraw commands additionally log to the server console/log.
When bank is given to person disbanding a faction, it now lets them know and logs it to the server log.
Added commands to commandDisable list in plugin.yml, along with "permanent" command which I'd missed adding before
Added new permission node factions.viewAnyFactionBalance (granted by default if using superperms), which is required to view the bank balance of other factions
For reference, about the faction bank addition as a whole...
New conf.json settings:
"bankEnabled": true, - enable faction banks
"bankMembersCanWithdraw": false, - have to be at least moderator to withdraw or pay money to another faction, unless this is set to true
"bankFactionPaysCosts": true, - if true, payments for faction command costs are charged to faction bank
"bankFactionPaysLandCosts": true, - if true, payments for land claims are charged to faction bank
New commands:
/f balance *<faction tag> - Shows the bank balance of a specified faction (if permission checks out), or the player's faction if none is specified
/f deposit <amount> - Deposit money into your faction's bank
/f pay <faction tag> <amount> - Pay money from your faction bank to another faction (requires moderator or admin status)
/f withdraw <amount> - Withdraw money from your faction's bank (requires moderator or admin status, unless "bankMembersCanWithdraw" is set to true)
New permission node:
factions.viewAnyFactionBalance - Allows the player to view the faction bank balance of all factions (default)
2011-10-01 12:59:09 +02:00
|
|
|
//Faction banks, to pay for land claiming and other costs instead of individuals paying for them
|
|
|
|
public static boolean bankEnabled = true;
|
2011-10-24 11:56:41 +02:00
|
|
|
//public static boolean bankMembersCanWithdraw = false; //Have to be at least moderator to withdraw or pay money to another faction
|
Some tweaking of the faction bank code...
The new help page with bank related commands will now only be shown if banks are enabled and the Economy is enabled and hooked in.
Shortened a couple of command descriptions to fit on one line.
Made Deposit, Pay, and Withdraw commands additionally log to the server console/log.
When bank is given to person disbanding a faction, it now lets them know and logs it to the server log.
Added commands to commandDisable list in plugin.yml, along with "permanent" command which I'd missed adding before
Added new permission node factions.viewAnyFactionBalance (granted by default if using superperms), which is required to view the bank balance of other factions
For reference, about the faction bank addition as a whole...
New conf.json settings:
"bankEnabled": true, - enable faction banks
"bankMembersCanWithdraw": false, - have to be at least moderator to withdraw or pay money to another faction, unless this is set to true
"bankFactionPaysCosts": true, - if true, payments for faction command costs are charged to faction bank
"bankFactionPaysLandCosts": true, - if true, payments for land claims are charged to faction bank
New commands:
/f balance *<faction tag> - Shows the bank balance of a specified faction (if permission checks out), or the player's faction if none is specified
/f deposit <amount> - Deposit money into your faction's bank
/f pay <faction tag> <amount> - Pay money from your faction bank to another faction (requires moderator or admin status)
/f withdraw <amount> - Withdraw money from your faction's bank (requires moderator or admin status, unless "bankMembersCanWithdraw" is set to true)
New permission node:
factions.viewAnyFactionBalance - Allows the player to view the faction bank balance of all factions (default)
2011-10-01 12:59:09 +02:00
|
|
|
public static boolean bankFactionPaysCosts = true; //The faction pays for faction command costs, such as sethome
|
|
|
|
public static boolean bankFactionPaysLandCosts = true; //The faction pays for land claiming costs.
|
2013-04-18 14:57:56 +02:00
|
|
|
|
2011-02-06 13:36:11 +01:00
|
|
|
}
|
2011-03-23 12:00:38 +01:00
|
|
|
|