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
2011-02-06 13:36:11 +01:00
import org.bukkit.* ;
2011-03-23 17:39:56 +01:00
import org.bukkit.entity.CreatureType ;
2011-07-18 22:06:02 +02:00
2011-10-08 22:03:44 +02:00
public class Conf
{
2011-10-09 14:53:38 +02:00
public static List < String > baseCommandAliases = new ArrayList < String > ( ) ;
public static boolean allowNoSlashCommand = true ;
2011-02-12 18:05:05 +01:00
// Colors
public static ChatColor colorMember = ChatColor . GREEN ;
public static ChatColor colorAlly = ChatColor . LIGHT_PURPLE ;
public static ChatColor colorNeutral = ChatColor . WHITE ;
public static ChatColor colorEnemy = ChatColor . RED ;
2011-10-21 19:20:33 +02:00
public static ChatColor colorPeaceful = ChatColor . GOLD ;
2011-10-22 17:03:49 +02:00
public static ChatColor colorWar = ChatColor . DARK_RED ;
//public static ChatColor colorWilderness = ChatColor.DARK_GREEN;
2011-10-08 22:03:44 +02:00
2011-02-12 18:05:05 +01:00
// Power
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 powerPlayerMax = 10 . 0 ;
public static double powerPlayerMin = - 10 . 0 ;
2011-02-12 18:05:05 +01:00
public static double powerPerMinute = 0 . 2 ; // Default health rate... it takes 5 min to heal one power
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 powerPerDeath = 4 . 0 ; // A death makes you lose 4 power
2011-06-01 13:54:00 +02:00
public static boolean powerRegenOffline = false ; // does player power regenerate even while they're offline?
2011-10-14 23:45:39 +02:00
public static double powerOfflineLossPerDay = 0 . 0 ; // players will lose this much power per day offline
2011-09-22 13:33:34 +02:00
public static double powerOfflineLossLimit = 0 . 0 ; // players will no longer lose power from being offline once their power drops to this amount or less
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 powerFactionMax = 0 . 0 ; // if greater than 0, the cap on how much power a faction can have (additional power from players beyond that will act as a "buffer" of sorts)
2011-02-06 13:36:11 +01:00
2011-02-12 18:05:05 +01:00
public static String prefixAdmin = " ** " ;
public static String prefixMod = " * " ;
2011-02-06 13:36:11 +01:00
2011-02-12 18:05:05 +01:00
public static int factionTagLengthMin = 3 ;
2011-02-13 16:37:21 +01:00
public static int factionTagLengthMax = 10 ;
public static boolean factionTagForceUpperCase = false ;
2011-02-06 13:36:11 +01:00
2011-10-08 22:03:44 +02:00
public static boolean newFactionsDefaultOpen = false ;
2011-05-29 23:28:29 +02:00
2011-09-13 05:46:20 +02:00
// what faction ID to start new players in when they first join the server; default is 0, "no faction"
2011-10-08 22:03:44 +02:00
public static String newPlayerStartingFactionID = " 0 " ;
2011-09-13 05:46:20 +02:00
2011-05-29 23:28:29 +02:00
public static boolean showMapFactionKey = true ;
2011-08-02 02:59:48 +02:00
public static boolean showNeutralFactionsOnMap = true ;
public static boolean showEnemyFactionsOnMap = true ;
2011-05-29 23:28:29 +02:00
2011-05-29 23:41:50 +02:00
// Disallow joining/leaving/kicking while power is negative
2011-10-15 19:46:09 +02:00
public static boolean canLeaveWithNegativePower = true ;
2011-05-29 23:41:50 +02:00
2011-09-10 06:26:15 +02:00
// Configuration for faction-only chat
public static boolean factionOnlyChat = true ;
2011-02-12 18:05:05 +01:00
// Configuration on the Faction tag in chat messages.
public static boolean chatTagEnabled = true ;
2011-06-12 02:02:57 +02:00
public static transient boolean chatTagHandledByAnotherPlugin = false ;
2011-02-12 18:05:05 +01:00
public static boolean chatTagRelationColored = true ;
2011-06-03 20:06:41 +02:00
public static String chatTagReplaceString = " {FACTION} " ;
public static String chatTagInsertAfterString = " " ;
public static String chatTagInsertBeforeString = " " ;
2011-02-12 18:05:05 +01:00
public static int chatTagInsertIndex = 1 ;
2011-06-03 20:06:41 +02:00
public static boolean chatTagPadBefore = false ;
public static boolean chatTagPadAfter = true ;
public static String chatTagFormat = " %s " + ChatColor . WHITE ;
2011-10-16 15:25:56 +02:00
public static String factionChatFormat = " %s: " + ChatColor . WHITE + " %s " ;
public static String allianceChatFormat = ChatColor . LIGHT_PURPLE + " %s: " + ChatColor . WHITE + " %s " ;
2011-02-12 18:05:05 +01:00
2011-10-14 23:45:39 +02:00
public static double autoLeaveAfterDaysOfInactivity = 10 . 0 ;
2011-03-23 17:39:56 +01:00
2011-09-08 13:24:55 +02:00
public static boolean worldGuardChecking = false ;
Additional logging, with new conf.json settings to enable/disable logging of specific events:
"logFactionCreate": true, - log faction creation
"logFactionDisband": true, - log factions being disbanded, by command or by circumstance
"logFactionJoin": true, - log player joining a faction
"logFactionKick": true, - log player being kicked from a faction
"logFactionLeave": true, - log player leaving a faction
"logLandClaims": true, - log land being claimed (including safe zone and war zone)
"logLandUnclaims": true, - log land being unclaimed (including safe zone and war zone)
"logMoneyTransactions": true, - log money being deposited, withdrawn, and otherwise transferred in relation to faction banks
Also a fix for a potential NPE from players logging out and Spout appearance handler referencing them afterwards
2011-10-23 19:50:02 +02:00
// server logging options
public static boolean logFactionCreate = true ;
public static boolean logFactionDisband = true ;
public static boolean logFactionJoin = true ;
public static boolean logFactionKick = true ;
public static boolean logFactionLeave = true ;
public static boolean logLandClaims = true ;
public static boolean logLandUnclaims = true ;
public static boolean logMoneyTransactions = true ;
2011-08-29 05:59:49 +02:00
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-03-23 17:39:56 +01:00
public static boolean homesTeleportToOnDeath = true ;
2011-06-30 12:15:16 +02:00
public static boolean homesRespawnFromNoPowerLossWorlds = true ;
2011-06-29 01:29:14 +02:00
public static boolean homesTeleportCommandEnabled = true ;
2011-10-13 12:17:23 +02:00
public static boolean homesTeleportCommandSmokeEffectEnabled = true ;
public static float homesTeleportCommandSmokeEffectThickness = 3f ;
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
2011-07-29 12:12:14 +02:00
public static boolean disablePVPBetweenNeutralFactions = false ;
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 ;
2011-06-23 03:10:42 +02:00
public static int noPVPDamageToOthersForXSecondsAfterLogin = 3 ;
2011-08-05 10:50:47 +02:00
public static boolean peacefulTerritoryDisablePVP = true ;
public static boolean peacefulTerritoryDisableMonsters = false ;
public static boolean peacefulMembersDisablePowerLoss = true ;
2011-06-21 04:15:41 +02:00
public static boolean claimsMustBeConnected = false ;
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 ;
2011-06-21 04:15:41 +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 considerFactionsReallyOfflineAfterXMinutes = 0 . 0 ;
2011-06-21 07:20:36 +02:00
2011-08-04 04:47:49 +02:00
public static int actionDeniedPainAmount = 1 ;
2011-08-04 07:07:38 +02:00
// commands which will be prevented when in claimed territory of another faction
public static Set < String > territoryNeutralDenyCommands = new HashSet < String > ( ) ;
public static Set < String > territoryEnemyDenyCommands = new HashSet < String > ( ) ;
2011-06-02 01:32:09 +02:00
public static double territoryShieldFactor = 0 . 3 ;
2011-06-02 01:13:56 +02:00
public static boolean territoryDenyBuild = true ;
2011-06-10 21:14:02 +02:00
public static boolean territoryDenyBuildWhenOffline = true ;
2011-08-04 04:47:49 +02:00
public static boolean territoryPainBuild = false ;
public static boolean territoryPainBuildWhenOffline = false ;
2011-06-02 01:13:56 +02:00
public static boolean territoryDenyUseage = true ;
2011-07-09 08:36:18 +02:00
public static boolean territoryEnemyDenyBuild = true ;
public static boolean territoryEnemyDenyBuildWhenOffline = true ;
2011-08-04 04:47:49 +02:00
public static boolean territoryEnemyPainBuild = false ;
public static boolean territoryEnemyPainBuildWhenOffline = false ;
2011-07-09 08:36:18 +02:00
public static boolean territoryEnemyDenyUseage = true ;
public static boolean territoryEnemyProtectMaterials = true ;
2011-08-24 00:12:17 +02:00
public static boolean territoryAllyDenyBuild = true ;
public static boolean territoryAllyDenyBuildWhenOffline = true ;
public static boolean territoryAllyPainBuild = false ;
public static boolean territoryAllyPainBuildWhenOffline = false ;
public static boolean territoryAllyDenyUseage = true ;
public static boolean territoryAllyProtectMaterials = true ;
2011-03-06 21:13:48 +01:00
public static boolean territoryBlockCreepers = false ;
2011-06-11 01:47:39 +02:00
public static boolean territoryBlockCreepersWhenOffline = false ;
2011-03-18 00:02:29 +01:00
public static boolean territoryBlockFireballs = false ;
2011-06-11 01:47:39 +02:00
public static boolean territoryBlockFireballsWhenOffline = false ;
New boolean config options territoryBlockTNT (default false), safeZoneDenyBuild (default true), safeZoneDenyUseage (default true), safeZoneBlockTNT (default true). territoryBlockTNT prevents TNT explosions inside faction territory, which defaults to false (same as before). It prevents TNT cannons from being a viable tactic, and I think for most people it would be an undesirable option. safeZoneBlockTNT prevents TNT explosions inside safe zone areas, which defaults to true (new behavior). I think most server operators would prefer safe zones to be safe from TNT, from TNT cannons or otherwise. safeZoneDenyBuild prevents players from building inside safe zone areas, which defaults to true (same as before). This option is added for server admins who, for whatever reason, want to let their players build and break inside safe zone areas. safeZoneDenyUseage prevents players from using items in the territoryDenyUseageMaterials list, which defaults to true (new behavior). This will (with the default list) prevent players from dumping/using buckets inside safe zone areas.
2011-04-04 13:31:48 +02:00
public static boolean territoryBlockTNT = false ;
2011-06-11 01:47:39 +02:00
public static boolean territoryBlockTNTWhenOffline = false ;
2011-09-22 13:22:01 +02:00
public static boolean territoryDenyEndermanBlocks = true ;
2011-10-01 13:16:53 +02:00
public static boolean territoryDenyEndermanBlocksWhenOffline = true ;
New boolean config options territoryBlockTNT (default false), safeZoneDenyBuild (default true), safeZoneDenyUseage (default true), safeZoneBlockTNT (default true). territoryBlockTNT prevents TNT explosions inside faction territory, which defaults to false (same as before). It prevents TNT cannons from being a viable tactic, and I think for most people it would be an undesirable option. safeZoneBlockTNT prevents TNT explosions inside safe zone areas, which defaults to true (new behavior). I think most server operators would prefer safe zones to be safe from TNT, from TNT cannons or otherwise. safeZoneDenyBuild prevents players from building inside safe zone areas, which defaults to true (same as before). This option is added for server admins who, for whatever reason, want to let their players build and break inside safe zone areas. safeZoneDenyUseage prevents players from using items in the territoryDenyUseageMaterials list, which defaults to true (new behavior). This will (with the default list) prevent players from dumping/using buckets inside safe zone areas.
2011-04-04 13:31:48 +02:00
public static boolean safeZoneDenyBuild = true ;
public static boolean safeZoneDenyUseage = true ;
public static boolean safeZoneBlockTNT = true ;
2011-07-29 13:39:20 +02:00
public static boolean safeZonePreventAllDamageToPlayers = false ;
2011-09-22 13:22:01 +02:00
public static boolean safeZoneDenyEndermanBlocks = true ;
2011-03-18 00:02:29 +01:00
2011-06-01 13:39:25 +02:00
public static boolean warZoneDenyBuild = true ;
public static boolean warZoneDenyUseage = true ;
2011-05-29 23:28:29 +02:00
public static boolean warZoneBlockCreepers = false ;
public static boolean warZoneBlockFireballs = false ;
public static boolean warZoneBlockTNT = true ;
public static boolean warZonePowerLoss = true ;
2011-06-10 14:38:14 +02:00
public static boolean warZoneFriendlyFire = false ;
2011-09-22 13:22:01 +02:00
public static boolean warZoneDenyEndermanBlocks = true ;
2011-05-29 23:28:29 +02:00
2011-06-02 01:32:09 +02:00
public static boolean wildernessDenyBuild = false ;
public static boolean wildernessDenyUseage = false ;
public static boolean wildernessBlockCreepers = false ;
public static boolean wildernessBlockFireballs = false ;
public static boolean wildernessBlockTNT = false ;
public static boolean wildernessPowerLoss = true ;
2011-09-22 13:22:01 +02:00
public static boolean wildernessDenyEndermanBlocks = false ;
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
public static boolean ownedAreasEnabled = true ;
public static int ownedAreasLimitPerFaction = 0 ;
public static boolean ownedAreasModeratorsCanSet = false ;
public static boolean ownedAreaModeratorsBypass = true ;
public static boolean ownedAreaDenyBuild = true ;
public static boolean ownedAreaPainBuild = false ;
public static boolean ownedAreaProtectMaterials = true ;
public static boolean ownedAreaDenyUseage = true ;
public static String ownedLandMessage = " Owner(s): " ;
public static String publicLandMessage = " Public faction land. " ;
public static boolean ownedMessageOnBorder = true ;
public static boolean ownedMessageInsideTerritory = true ;
public static boolean ownedMessageByChunk = false ;
2011-07-20 19:22:03 +02:00
public static boolean pistonProtectionThroughDenyBuild = true ;
2011-06-11 01:45:11 +02:00
public static Set < Material > territoryProtectedMaterials = EnumSet . noneOf ( Material . class ) ;
public static Set < Material > territoryDenyUseageMaterials = EnumSet . noneOf ( Material . class ) ;
public static Set < Material > territoryProtectedMaterialsWhenOffline = EnumSet . noneOf ( Material . class ) ;
public static Set < Material > territoryDenyUseageMaterialsWhenOffline = EnumSet . noneOf ( Material . class ) ;
2011-03-22 20:36:33 +01:00
2011-06-11 01:45:11 +02:00
public static transient Set < CreatureType > safeZoneNerfedCreatureTypes = EnumSet . noneOf ( CreatureType . class ) ;
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
2011-08-20 03:36:23 +02:00
// Spout features
2011-10-13 21:09:47 +02:00
public static boolean spoutFactionTagsOverNames = true ; // show faction tags over names over player heads
public static boolean spoutFactionTitlesOverNames = true ; // whether to include player's title in that
public static boolean spoutFactionAdminCapes = true ; // Show capes on faction admins, colored based on the viewer's relation to the target player
public static boolean spoutFactionModeratorCapes = true ; // same, but for faction moderators
public static int spoutTerritoryDisplayPosition = 3 ; // permanent territory display, instead of by chat; 0 = disabled, 1 = top left, 2 = top center, 3+ = top right
public static float spoutTerritoryDisplaySize = 1 . 0f ; // text scale (size) for territory display
public static boolean spoutTerritoryDisplayShowDescription = true ; // whether to show the faction description, not just the faction tag
public static boolean spoutTerritoryOwnersShow = true ; // show territory owner list as well
public static boolean spoutTerritoryNoticeShow = true ; // show additional brief territory notice near center of screen, to be sure player notices transition
public static int spoutTerritoryNoticeTop = 40 ; // how far down the screen to place the additional notice
public static boolean spoutTerritoryNoticeShowDescription = false ; // whether to show the faction description in the notice, not just the faction tag
public static float spoutTerritoryNoticeSize = 1 . 5f ; // text scale (size) for notice
public static float spoutTerritoryNoticeLeaveAfterSeconds = 2 . 00f ; // how many seconds before the notice goes away
2011-08-23 19:49:32 +02:00
public static String capeAlly = " https://github.com/MassiveCraft/Factions/raw/master/capes/ally.png " ;
public static String capeEnemy = " https://github.com/MassiveCraft/Factions/raw/master/capes/enemy.png " ;
public static String capeMember = " https://github.com/MassiveCraft/Factions/raw/master/capes/member.png " ;
public static String capeNeutral = " https://github.com/MassiveCraft/Factions/raw/master/capes/neutral.png " ;
public static String capePeaceful = " https://github.com/MassiveCraft/Factions/raw/master/capes/peaceful.png " ;
2011-08-20 03:36:23 +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
// Economy settings
2011-10-12 17:25:01 +02:00
public static boolean econEnabled = false ;
public static String econUniverseAccount = " " ;
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 ;
public static double econCostCreate = 100 . 0 ;
public static double econCostOwner = 15 . 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 ;
public static double econCostHome = 0 . 0 ;
public static double econCostTag = 0 . 0 ;
public static double econCostDesc = 0 . 0 ;
public static double econCostTitle = 0 . 0 ;
public static double econCostList = 0 . 0 ;
public static double econCostMap = 0 . 0 ;
public static double econCostPower = 0 . 0 ;
public static double econCostShow = 0 . 0 ;
public static double econCostOpen = 0 . 0 ;
public static double econCostAlly = 0 . 0 ;
public static double econCostEnemy = 0 . 0 ;
public static double econCostNeutral = 0 . 0 ;
2011-08-05 10:50:47 +02:00
public static double econCostNoBoom = 0 . 0 ;
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 ;
public static boolean bankMembersCanWithdraw = false ; //Have to be at least moderator to withdraw or pay money to another faction
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.
2011-05-29 23:28:29 +02:00
public static Set < String > worldsNoClaiming = new HashSet < String > ( ) ;
public static Set < String > worldsNoPowerLoss = new HashSet < String > ( ) ;
2011-08-02 03:22:16 +02:00
public static Set < String > worldsIgnorePvP = new HashSet < String > ( ) ;
2011-08-23 07:37:31 +02:00
public static Set < String > worldsNoWildernessProtection = new HashSet < String > ( ) ;
2011-05-29 23:28:29 +02:00
2011-03-23 17:39:56 +01:00
public static transient int mapHeight = 8 ;
2011-04-28 22:45:43 +02:00
public static transient int mapWidth = 39 ;
2011-05-29 23:28:29 +02:00
public static transient char [ ] mapKeyChrs = " \\ /#?$%=&^ABCDEFGHJKLMNOPQRSTUVWXYZ1234567890abcdeghjmnopqrsuvwxyz " . toCharArray ( ) ;
2011-02-06 13:36:11 +01:00
2011-10-08 22:03:44 +02:00
static
{
2011-10-09 14:53:38 +02:00
baseCommandAliases . add ( " f " ) ;
2011-08-05 10:51:35 +02:00
territoryEnemyDenyCommands . add ( " home " ) ;
territoryEnemyDenyCommands . add ( " sethome " ) ;
territoryEnemyDenyCommands . add ( " spawn " ) ;
2011-10-10 22:45:15 +02:00
territoryEnemyDenyCommands . add ( " tpahere " ) ;
territoryEnemyDenyCommands . add ( " tpaccept " ) ;
territoryEnemyDenyCommands . add ( " tpa " ) ;
2011-08-05 10:51:35 +02:00
2011-02-07 21:42:14 +01:00
territoryProtectedMaterials . add ( Material . WOODEN_DOOR ) ;
2011-06-02 01:13:56 +02:00
territoryProtectedMaterials . add ( Material . TRAP_DOOR ) ;
2011-10-15 19:46:09 +02:00
territoryProtectedMaterials . add ( Material . FENCE_GATE ) ;
2011-02-07 21:42:14 +01:00
territoryProtectedMaterials . add ( Material . DISPENSER ) ;
territoryProtectedMaterials . add ( Material . CHEST ) ;
territoryProtectedMaterials . add ( Material . FURNACE ) ;
2011-07-09 04:28:53 +02:00
territoryProtectedMaterials . add ( Material . BURNING_FURNACE ) ;
2011-07-20 21:59:10 +02:00
territoryProtectedMaterials . add ( Material . DIODE_BLOCK_OFF ) ;
territoryProtectedMaterials . add ( Material . DIODE_BLOCK_ON ) ;
2011-03-30 06:37:32 +02:00
2011-03-23 12:00:38 +01:00
territoryDenyUseageMaterials . add ( Material . FLINT_AND_STEEL ) ;
territoryDenyUseageMaterials . add ( Material . BUCKET ) ;
territoryDenyUseageMaterials . add ( Material . WATER_BUCKET ) ;
2011-03-30 06:37:32 +02:00
territoryDenyUseageMaterials . add ( Material . LAVA_BUCKET ) ;
2011-08-05 10:50:47 +02:00
2011-06-04 11:36:03 +02:00
territoryProtectedMaterialsWhenOffline . add ( Material . WOODEN_DOOR ) ;
territoryProtectedMaterialsWhenOffline . add ( Material . TRAP_DOOR ) ;
2011-10-15 19:46:09 +02:00
territoryProtectedMaterialsWhenOffline . add ( Material . FENCE_GATE ) ;
2011-06-04 11:36:03 +02:00
territoryProtectedMaterialsWhenOffline . add ( Material . DISPENSER ) ;
territoryProtectedMaterialsWhenOffline . add ( Material . CHEST ) ;
territoryProtectedMaterialsWhenOffline . add ( Material . FURNACE ) ;
2011-07-09 04:28:53 +02:00
territoryProtectedMaterialsWhenOffline . add ( Material . BURNING_FURNACE ) ;
2011-07-20 21:59:10 +02:00
territoryProtectedMaterialsWhenOffline . add ( Material . DIODE_BLOCK_OFF ) ;
territoryProtectedMaterialsWhenOffline . add ( Material . DIODE_BLOCK_ON ) ;
2011-06-04 11:36:03 +02:00
territoryDenyUseageMaterialsWhenOffline . add ( Material . FLINT_AND_STEEL ) ;
territoryDenyUseageMaterialsWhenOffline . add ( Material . BUCKET ) ;
territoryDenyUseageMaterialsWhenOffline . add ( Material . WATER_BUCKET ) ;
territoryDenyUseageMaterialsWhenOffline . add ( Material . LAVA_BUCKET ) ;
2011-03-30 06:37:32 +02:00
2011-10-01 02:44:53 +02:00
safeZoneNerfedCreatureTypes . add ( CreatureType . CAVE_SPIDER ) ;
2011-03-23 17:39:56 +01:00
safeZoneNerfedCreatureTypes . add ( CreatureType . CREEPER ) ;
2011-10-01 02:44:53 +02:00
safeZoneNerfedCreatureTypes . add ( CreatureType . ENDERMAN ) ;
2011-03-23 17:39:56 +01:00
safeZoneNerfedCreatureTypes . add ( CreatureType . GHAST ) ;
safeZoneNerfedCreatureTypes . add ( CreatureType . PIG_ZOMBIE ) ;
2011-10-01 02:44:53 +02:00
safeZoneNerfedCreatureTypes . add ( CreatureType . SILVERFISH ) ;
2011-03-23 17:39:56 +01:00
safeZoneNerfedCreatureTypes . add ( CreatureType . SKELETON ) ;
safeZoneNerfedCreatureTypes . add ( CreatureType . SPIDER ) ;
safeZoneNerfedCreatureTypes . add ( CreatureType . SLIME ) ;
safeZoneNerfedCreatureTypes . add ( CreatureType . ZOMBIE ) ;
2011-02-06 13:36:11 +01:00
}
2011-04-06 12:04:57 +02:00
2011-03-18 17:33:23 +01:00
// -------------------------------------------- //
2011-02-06 13:36:11 +01:00
// Persistance
2011-03-18 17:33:23 +01:00
// -------------------------------------------- //
2011-10-08 22:03:44 +02:00
private static transient Conf i = new Conf ( ) ;
public static void load ( )
{
P . p . persist . loadOrSaveDefault ( i , Conf . class , " conf " ) ;
2011-03-18 17:33:23 +01:00
}
2011-10-08 22:03:44 +02:00
public static void save ( )
{
P . p . persist . save ( i ) ;
2011-02-06 13:36:11 +01:00
}
}
2011-03-23 12:00:38 +01:00