Config.java 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. package com.gmail.nossr50.config;
  2. import com.gmail.nossr50.mcMMO;
  3. import com.gmail.nossr50.datatypes.HUDType;
  4. public class Config extends ConfigLoader {
  5. public int xpGainMultiplier = 1;
  6. private static Config instance;
  7. public static Config getInstance() {
  8. if (instance == null) {
  9. instance = new Config(mcMMO.p);
  10. }
  11. return instance;
  12. }
  13. /*
  14. * GENERAL SETTINGS
  15. */
  16. /* General Settings */
  17. public String getLocale() { return config.getString("General.Locale", "en_us"); }
  18. public boolean getMOTDEnabled() { return config.getBoolean("General.MOTD_Enabled", true); }
  19. public int getSaveInterval() { return config.getInt("General.Save_Interval", 10); }
  20. public boolean getStatsTrackingEnabled() { return config.getBoolean("General.Stats_Tracking", true); }
  21. public boolean getEventCallbackEnabled() { return config.getBoolean("General.Event_Callback", true); }
  22. /* mySQL */
  23. public boolean getUseMySQL() { return config.getBoolean("MySQL.Enabled", false); }
  24. public String getMySQLTablePrefix() { return config.getString("MySQL.Database.TablePrefix", "mcmmo_"); }
  25. public String getMySQLDatabaseName() { return config.getString("MySQL.Database.Name", "DatabaseName"); }
  26. public String getMySQLUserName() { return config.getString("MySQL.Database.User_Name", "UserName"); } //Really should be labeled under MySQL.User_Name instead...
  27. public int getMySQLServerPort() { return config.getInt("MySQL.Server.Port", 3306); }
  28. public String getMySQLServerName() { return config.getString("MySQL.Server.Address", "localhost"); }
  29. public String getMySQLUserPassword() {
  30. if (config.getString("MySQL.Database.User_Password", null) != null) {
  31. return config.getString("MySQL.Database.User_Password", null);
  32. }
  33. else {
  34. return "";
  35. }
  36. }
  37. /* Hardcore Mode */
  38. public boolean getHardcoreEnabled() { return config.getBoolean("Hardcore.Enabled", false); }
  39. public double getHardcoreDeathStatPenaltyPercentage() { return config.getDouble("Hardcore.Death_Stat_Loss_Penalty_Percentage", 75); }
  40. public double getHardcoreVampirismStatLeechPercentage() { return config.getDouble("Hardcore.Vampirism_Stat_Leech_Percentage", 5); }
  41. public boolean getHardcoreVampirismEnabled() { return config.getBoolean("Hardcore.Vampirism", false); }
  42. /* Commands */
  43. public boolean getCommandXPLockEnabled() { return config.getBoolean("Commands.xplock.Enabled", true); }
  44. public boolean getCommandXPRateEnabled() { return config.getBoolean("Commands.xprate.Enabled", true); }
  45. public boolean getCommandMCTopEnabled() { return config.getBoolean("Commands.mctop.Enabled", true); }
  46. public boolean getCommandAddXPEnabled() { return config.getBoolean("Commands.addxp.Enabled", true); }
  47. public boolean getCommandAddLevelsEnabled() { return config.getBoolean("Commands.addlevels.Enabled", true); }
  48. public boolean getCommandMCAbilityEnabled() { return config.getBoolean("Commands.mcability.Enabled", true); }
  49. public boolean getCommandMCRefreshEnabled() { return config.getBoolean("Commands.mcrefresh.Enabled", true); }
  50. public boolean getCommandmcMMOEnabled() { return config.getBoolean("Commands.mcmmo.Enabled", true); }
  51. public boolean getCommandMCCEnabled() { return config.getBoolean("Commands.mcc.Enabled", true); }
  52. public boolean getCommandMCGodEnabled() { return config.getBoolean("Commands.mcgod.Enabled", true); }
  53. public boolean getCommandMCStatsEnabled() { return config.getBoolean("Commands.mcstats.Enabled", true); }
  54. public boolean getCommandMmoeditEnabled() { return config.getBoolean("Commands.mmoedit.Enabled", true); }
  55. public boolean getCommandMCRemoveEnabled() { return config.getBoolean("Commands.mcremove.Enable", true); }
  56. public boolean getCommandPTPEnabled() { return config.getBoolean("Commands.ptp.Enabled", true); }
  57. public boolean getCommandPartyEnabled() { return config.getBoolean("Commands.party.Enabled", true); }
  58. public boolean getCommandInspectEnabled() { return config.getBoolean("Commands.inspect.Enabled", true); }
  59. public boolean getCommandInviteEnabled() { return config.getBoolean("Commands.invite.Enabled", true); }
  60. public boolean getCommandAcceptEnabled() { return config.getBoolean("Commands.accept.Enabled", true); }
  61. public boolean getCommandAdminChatAEnabled() { return config.getBoolean("Commands.a.Enabled", true); }
  62. public boolean getCommandPartyChatPEnabled() { return config.getBoolean("Commands.p.Enabled", true); }
  63. public int getPTPCommandCooldown() { return config.getInt("Commands.ptp.Cooldown", 30); }
  64. public boolean getDonateMessageEnabled() { return config.getBoolean("Commands.mcmmo.Donate_Message", true); }
  65. /* Items */
  66. public int getChimaeraCost() { return config.getInt("Items.Chimaera_Wing.Feather_Cost", 10); }
  67. public int getChimaeraItemId() { return config.getInt("Items.Chimaera_Wing.Item_ID", 288); }
  68. public boolean getChimaeraEnabled() { return config.getBoolean("Items.Chimaera_Wing.Enabled", true); }
  69. /*
  70. * ABILITY SETTINGS
  71. */
  72. /* General Settings */
  73. public boolean getAbilityMessagesEnabled() { return config.getBoolean("Abilities.Messages", true); }
  74. public boolean getAbilitiesEnabled() { return config.getBoolean("Abilities.Enabled", true); }
  75. public boolean getAbilitiesOnlyActivateWhenSneaking() { return config.getBoolean("Abilities.Activation.Only_Activate_When_Sneaking", false); }
  76. /* Durability Settings */
  77. public boolean getAbilitiesDamageTools() { return config.getBoolean("Abilities.Tools.Durability_Loss_Enabled", true); }
  78. public int getAbilityToolDamage() { return config.getInt("Abilities.Tools.Durability_Loss", 2); }
  79. /* Cooldowns */
  80. public int getAbilityCooldownGreenTerra() { return config.getInt("Abilities.Cooldowns.Green_Terra", 240); }
  81. public int getAbilityCooldownSuperBreaker() { return config.getInt("Abilities.Cooldowns.Super_Breaker", 240); }
  82. public int getAbilityCooldownGigaDrillBreaker() { return config.getInt("Abilities.Cooldowns.Giga_Drill_Breaker", 240); }
  83. public int getAbilityCooldownTreeFeller() { return config.getInt("Abilities.Cooldowns.Tree_Feller", 240); }
  84. public int getAbilityCooldownBerserk() { return config.getInt("Abilities.Cooldowns.Berserk", 240); }
  85. public int getAbilityCooldownSerratedStrikes() { return config.getInt("Abilities.Cooldowns.Serrated_Strikes", 240); }
  86. public int getAbilityCooldownSkullSplitter() { return config.getInt("Abilities.Cooldowns.Skull_Splitter", 240); }
  87. public int getAbilityCooldownBlastMining() { return config.getInt("Abilities.Cooldowns.Blast_Mining", 60); }
  88. /* Thresholds */
  89. public int getTreeFellerThreshold() { return config.getInt("Abilities.Limits.Tree_Feller_Threshold", 500); }
  90. /*
  91. * SKILL SETTINGS
  92. */
  93. /* Tool Requirements */
  94. public boolean getMiningRequiresTool() { return config.getBoolean("Skills.Mining.Requires_Pickaxe", true); }
  95. public boolean getExcavationRequiresTool() { return config.getBoolean("Skills.Excavation.Requires_Shovel", true); }
  96. public boolean getWoodcuttingRequiresTool() { return config.getBoolean("Skills.Woodcutting.Requires_Axe", true); }
  97. /* Excavation */
  98. public int getExcavationBaseXP() { return config.getInt("Experience.Excavation.Base", 40); }
  99. /* Fishing */
  100. public int getFishingBaseXP() { return config.getInt("Experience.Fishing.Base", 800); }
  101. public boolean getFishingDropsEnabled() { return config.getBoolean("Fishing.Drops_Enabled", true); }
  102. public int getFishingTierLevelsTier1() { return config.getInt("Fishing.Tier_Levels.Tier1", 0); }
  103. public int getFishingTierLevelsTier2() { return config.getInt("Fishing.Tier_Levels.Tier2", 200); }
  104. public int getFishingTierLevelsTier3() { return config.getInt("Fishing.Tier_Levels.Tier3", 400); }
  105. public int getFishingTierLevelsTier4() { return config.getInt("Fishing.Tier_Levels.Tier4", 600); }
  106. public int getFishingTierLevelsTier5() { return config.getInt("Fishing.Tier_Levels.Tier5", 800); }
  107. /* Herbalism */
  108. public int getHerbalismXPSugarCane() { return config.getInt("Experience.Herbalism.Sugar_Cane", 30); }
  109. public int getHerbalismXPWheat() { return config.getInt("Experience.Herbalism.Wheat", 50); }
  110. public int getHerbalismXPCactus() { return config.getInt("Experience.Herbalism.Cactus", 30); }
  111. public int getHerbalismXPPumpkin() { return config.getInt("Experience.Herbalism.Pumpkin", 20); }
  112. public int getHerbalismXPFlowers() { return config.getInt("Experience.Herbalism.Flowers", 100); }
  113. public int getHerbalismXPMushrooms() { return config.getInt("Experience.Herbalism.Mushrooms", 150); }
  114. public int getHerbalismXPMelon() { return config.getInt("Experience.Herbalism.Melon", 20); }
  115. public int getHerbalismXPNetherWart() { return config.getInt("Experience.Herbalism.Nether_Wart", 50); }
  116. public int getHerbalismXPLilyPads() { return config.getInt("Experience.Herbalism.Lily_Pads", 100); }
  117. public int getHerbalismXPVines() { return config.getInt("Experience.Herbalism.Vines", 10); }
  118. public boolean getHerbalismHungerBonusEnabled() { return config.getBoolean("Skills.Herbalism.Hunger_Bonus", true); }
  119. public boolean getHerbalismWheatRegrowth() { return config.getBoolean("Skills.Herbalism.Instant_Wheat_Regrowth", true); }
  120. public boolean getHerbalismGreenThumbCobbleToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true); }
  121. public boolean getHerbalismGreenThumbSmoothbrickToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true); }
  122. public boolean getHerbalismGreenThumbDirtToGrass() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Dirt_To_Grass", true); }
  123. public boolean getBrownMushroomsDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Brown_Mushrooms", true); }
  124. public boolean getCactiDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Cacti", true); }
  125. public boolean getWheatDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Wheat", true); }
  126. public boolean getMelonsDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Melons", true); }
  127. public boolean getNetherWartsDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Nether_Warts", true); }
  128. public boolean getPumpkinsDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Pumpkins", true); }
  129. public boolean getRedMushroomsDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Red_Mushrooms", true); }
  130. public boolean getRedRosesDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Red_Roses", true); }
  131. public boolean getSugarCaneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Sugar_Cane", true); }
  132. public boolean getVinesDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Vines", true); }
  133. public boolean getWaterLiliesDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Water_Lilies", true); }
  134. public boolean getYellowFlowersDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Yellow_Flowers", true); }
  135. /* Mining */
  136. public int getMiningXPGoldOre() { return config.getInt("Experience.Mining.Gold", 250); }
  137. public int getMiningXPDiamondOre() { return config.getInt("Experience.Mining.Diamond", 750); }
  138. public int getMiningXPIronOre() { return config.getInt("Experience.Mining.Iron", 250); }
  139. public int getMiningXPRedstoneOre() { return config.getInt("Experience.Mining.Redstone", 150); }
  140. public int getMiningXPLapisOre() { return config.getInt("Experience.Mining.Lapis", 400); }
  141. public int getMiningXPObsidian() { return config.getInt("Experience.Mining.Obsidian", 150); }
  142. public int getMiningXPNetherrack() { return config.getInt("Experience.Mining.Netherrack", 30); }
  143. public int getMiningXPGlowstone() { return config.getInt("Experience.Mining.Glowstone", 30); }
  144. public int getMiningXPCoalOre() { return config.getInt("Experience.Mining.Coal", 100); }
  145. public int getMiningXPStone() { return config.getInt("Experience.Mining.Stone", 30); }
  146. public int getMiningXPSandstone() { return config.getInt("Experience.Mining.Sandstone", 30); }
  147. public int getMiningXPEndStone() { return config.getInt("Experience.Mining.End_Stone", 150); }
  148. public int getMiningXPMossyStone() { return config.getInt("Experience.Mining.Moss_Stone", 30); }
  149. public boolean getCoalDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Coal", true); }
  150. public boolean getDiamondDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Diamond", true); }
  151. public boolean getEndStoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.End_Stone", true); }
  152. public boolean getGlowstoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Glowstone", true); }
  153. public boolean getGoldDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Gold", true); }
  154. public boolean getIronDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Iron", true); }
  155. public boolean getLapisDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Lapis", true); }
  156. public boolean getMossyCobblestoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Moss_Stone", true); }
  157. public boolean getNetherrackDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Netherrack", true); }
  158. public boolean getObsidianDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Obsidian", true); }
  159. public boolean getRedstoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Redstone", true); }
  160. public boolean getSandstoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Sandstone", true); }
  161. public boolean getStoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Stone", true); }
  162. public int getDetonatorItemID() { return config.getInt("Skills.Mining.Detonator_ID", 259); }
  163. /* Repair */
  164. public boolean getRepairAnvilMessagesEnabled() { return config.getBoolean("Skills.Repair.Anvil_Messages", true); }
  165. public int getRepairAnvilId() { return config.getInt("Skills.Repair.Anvil_ID", 42); }
  166. public int getRepairGoldMaterial() { return config.getInt("Skills.Repair.Gold.ID", 266); }
  167. public int getRepairStoneMaterial() { return config.getInt("Skills.Repair.Stone.ID", 4); }
  168. public int getRepairWoodMaterial() { return config.getInt("Skills.Repair.Wood.ID", 5); }
  169. public int getRepairDiamondMaterial() { return config.getInt("Skills.Repair.Diamond.ID", 264); }
  170. public int getRepairIronMaterial() { return config.getInt("Skills.Repair.Iron.ID", 265); }
  171. public int getRepairStringMaterial() { return config.getInt("Skills.Repair.String.ID", 287); }
  172. public int getRepairLeatherMaterial() { return config.getInt("Skills.Repair.Leather.ID", 334); }
  173. public boolean getRepairArmorAllowed() { return config.getBoolean("Skills.Repair.Can_Repair_Armor", true); }
  174. public boolean getRepairToolsAllowed() { return config.getBoolean("Skills.Repair.Can_Repair_Tools", true); }
  175. public int getRepairDiamondLevelRequirement() { return config.getInt("Skills.Repair.Diamond.Level_Required", 50); }
  176. public int getRepairIronLevelRequirement() { return config.getInt("Skills.Repair.Iron.Level_Required", 0); }
  177. public int getRepairGoldLevelRequirement() { return config.getInt("Skills.Repair.Gold.Level_Required", 0); }
  178. public int getRepairStoneLevelRequirement() { return config.getInt("Skills.Repair.Stone.Level_Required", 0); }
  179. public int getRepairStringLevelRequirement() { return config.getInt("Skills.Repair.String.Level_Required", 0); }
  180. /* Taming */
  181. public int getTamingXPWolf() { return config.getInt("Experience.Taming.Animal_Taming.Wolf", 250); }
  182. public int getTamingXPOcelot() { return config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); }
  183. public int getTamingCOTWWolfCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); }
  184. public int getTamingCOTWOcelotCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Fish_Required", 10); }
  185. /* Woodcutting */
  186. public int getWoodcuttingXPOak() { return config.getInt("Experience.Woodcutting.Oak", 70); }
  187. public int getWoodcuttingXPBirch() { return config.getInt("Experience.Woodcutting.Birch", 90); }
  188. public int getWoodcuttingXPSpruce() { return config.getInt("Experience.Woodcutting.Spruce", 80); }
  189. public int getWoodcuttingXPJungle() { return config.getInt("Experience.Woodcutting.Jungle", 100); }
  190. public boolean getOakDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Oak", true); }
  191. public boolean getBirchDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Birch", true); }
  192. public boolean getSpruceDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Spruce", true); }
  193. public boolean getJungleDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Jungle", true); }
  194. /* Arcane Forging */
  195. public boolean getArcaneForgingDowngradeEnabled() { return config.getBoolean("Arcane_Forging.Downgrades.Enabled", true); }
  196. public int getArcaneForgingDowngradeChanceRank1() { return config.getInt("Arcane_Forging.Downgrades.Chance.Rank_1", 75); }
  197. public int getArcaneForgingDowngradeChanceRank2() { return config.getInt("Arcane_Forging.Downgrades.Chance.Rank_2", 50); }
  198. public int getArcaneForgingDowngradeChanceRank3() { return config.getInt("Arcane_Forging.Downgrades.Chance.Rank_3", 25); }
  199. public int getArcaneForgingDowngradeChanceRank4() { return config.getInt("Arcane_Forging.Downgrades.Chance.Rank_4", 15); }
  200. public boolean getArcaneForgingEnchantLossEnabled() { return config.getBoolean("Arcane_Forging.May_Lose_Enchants", true); }
  201. public int getArcaneForgingKeepEnchantsChanceRank1() { return config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_1", 10); }
  202. public int getArcaneForgingKeepEnchantsChanceRank2() { return config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_2", 20); }
  203. public int getArcaneForgingKeepEnchantsChanceRank3() { return config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_3", 30); }
  204. public int getArcaneForgingKeepEnchantsChanceRank4() { return config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_4", 40); }
  205. public int getArcaneForgingRankLevels1() { return config.getInt("Arcane_Forging.Rank_Levels.Rank_1", 100); }
  206. public int getArcaneForgingRankLevels2() { return config.getInt("Arcane_Forging.Rank_Levels.Rank_2", 250); }
  207. public int getArcaneForgingRankLevels3() { return config.getInt("Arcane_Forging.Rank_Levels.Rank_3", 500); }
  208. public int getArcaneForgingRankLevels4() { return config.getInt("Arcane_Forging.Rank_Levels.Rank_4", 750); }
  209. /* Level Caps */
  210. public int getLevelCapAcrobatics() { return config.getInt("Skills.Acrobatics.Level_Cap", 0); }
  211. public int getLevelCapArchery() { return config.getInt("Skills.Archery.Level_Cap", 0); }
  212. public int getLevelCapAxes() { return config.getInt("Skills.Axes.Level_Cap", 0); }
  213. public int getLevelCapExcavation() { return config.getInt("Skills.Excavation.Level_Cap", 0); }
  214. public int getLevelCapFishing() { return config.getInt("Skills.Fishing.Level_Cap", 0); }
  215. public int getLevelCapHerbalism() { return config.getInt("Skills.Herbalism.Level_Cap", 0); }
  216. public int getLevelCapMining() { return config.getInt("Skills.Mining.Level_Cap", 0); }
  217. public int getLevelCapRepair() { return config.getInt("Skills.Repair.Level_Cap", 0); }
  218. public int getLevelCapSwords() { return config.getInt("Skills.Swords.Level_Cap", 0); }
  219. public int getLevelCapTaming() { return config.getInt("Skills.Taming.Level_Cap", 0); }
  220. public int getLevelCapUnarmed() { return config.getInt("Skills.Unarmed.Level_Cap", 0); }
  221. public int getLevelCapWoodcutting() { return config.getInt("Skills.Woodcutting.Level_Cap", 0); }
  222. public int getPowerLevelCap() { return config.getInt("General.Power_Level_Cap", 0); }
  223. /*
  224. * XP SETTINGS
  225. */
  226. /* General Settings */
  227. public boolean getExperienceGainsMobspawnersEnabled() { return config.getBoolean("Experience.Gains.Mobspawners.Enabled", false); }
  228. public boolean getExperienceGainsPlayerVersusPlayerEnabled() { return config.getBoolean("Experience.PVP.Rewards", true); }
  229. public int getExperienceGainsGlobalMultiplier() { return config.getInt("Experience.Gains.Multiplier.Global", 1); }
  230. /* Combat XP Multipliers */
  231. public double getPlayerVersusPlayerXP() { return config.getDouble("Experience.Gains.Multiplier.PVP", 1.0); }
  232. public double getAnimalsXP() { return config.getDouble("Experience.Combat.Multiplier.Animals", 1.0); }
  233. public double getCreeperXP() { return config.getDouble("Experience.Combat.Multiplier.Creeper", 4.0); }
  234. public double getSkeletonXP() { return config.getDouble("Experience.Combat.Multiplier.Skeleton", 2.0); }
  235. public double getSpiderXP() { return config.getDouble("Experience.Combat.Multiplier.Spider", 3.0); }
  236. public double getGhastXP() { return config.getDouble("Experience.Combat.Multiplier.Ghast", 3.0); }
  237. public double getSlimeXP() { return config.getDouble("Experience.Combat.Multiplier.Slime", 2.0); }
  238. public double getZombieXP() { return config.getDouble("Experience.Combat.Multiplier.Zombie", 2.0); }
  239. public double getPigZombieXP() { return config.getDouble("Experience.Combat.Multiplier.Pig_Zombie", 3.0); }
  240. public double getEndermanXP() { return config.getDouble("Experience.Combat.Multiplier.Enderman", 2.0); }
  241. public double getCaveSpiderXP() { return config.getDouble("Experience.Combat.Multiplier.Cave_Spider", 3.0); }
  242. public double getSilverfishXP() { return config.getDouble("Experience.Combat.Multiplier.Silverfish", 3.0); }
  243. public double getBlazeXP() { return config.getDouble("Experience.Combat.Multiplier.Blaze", 3.0); }
  244. public double getMagmaCubeXP() { return config.getDouble("Experience.Combat.Multiplier.Magma_Cube", 2.0); }
  245. public double getEnderDragonXP() { return config.getDouble("Experience.Combat.Multiplier.Ender_Dragon", 8.0); }
  246. public double getIronGolemXP() { return config.getDouble("Experience.Combat.Multiplier.Iron_Golem", 2.0); }
  247. /* XP Formula Multiplier */
  248. public double getFormulaMultiplierTaming() { return config.getDouble("Experience.Formula.Multiplier.Taming", 1.0); }
  249. public double getFormulaMultiplierMining() { return config.getDouble("Experience.Formula.Multiplier.Mining", 1.0); }
  250. public double getFormulaMultiplierRepair() { return config.getDouble("Experience.Formula.Multiplier.Repair", 1.0); }
  251. public double getFormulaMultiplierWoodcutting() { return config.getDouble("Experience.Formula.Multiplier.Woodcutting", 1.0); }
  252. public double getFormulaMultiplierUnarmed() { return config.getDouble("Experience.Formula.Multiplier.Unarmed", 1.0); }
  253. public double getFormulaMultiplierHerbalism() { return config.getDouble("Experience.Formula.Multiplier.Herbalism", 1.0); }
  254. public double getFormulaMultiplierExcavation() { return config.getDouble("Experience.Formula.Multiplier.Excavation", 1.0); }
  255. public double getFormulaMultiplierArchery() { return config.getDouble("Experience.Formula.Multiplier.Archery", 1.0); }
  256. public double getFormulaMultiplierSwords() { return config.getDouble("Experience.Formula.Multiplier.Swords", 1.0); }
  257. public double getFormulaMultiplierAxes() { return config.getDouble("Experience.Formula.Multiplier.Axes", 1.0); }
  258. public double getFormulaMultiplierAcrobatics() { return config.getDouble("Experience.Formula.Multiplier.Acrobatics", 1.0); }
  259. public double getFormulaMultiplierFishing() { return config.getDouble("Experience.Formula.Multiplier.Fishing", 1.0); }
  260. /*
  261. * SPOUT SETTINGS
  262. */
  263. public boolean spoutEnabled;
  264. public boolean getShowPowerLevelForSpout() { return config.getBoolean("Spout.HUD.Show_Power_Level", true); }
  265. /* Spout XP Bar */
  266. public boolean getSpoutXPBarEnabled() { return config.getBoolean("Spout.XP.Bar.Enabled", true); }
  267. public boolean getSpoutXPBarIconEnabled() { return config.getBoolean("Spout.XP.Icon.Enabled", true); }
  268. public int getSpoutXPBarXPosition() { return config.getInt("Spout.XP.Bar.X_POS", 95); }
  269. public int getSpoutXPBarYPosition() { return config.getInt("Spout.XP.Bar.Y_POS", 6); }
  270. public int getSpoutXPIconXPosition() { return config.getInt("Spout.XP.Icon.X_POS", 78); }
  271. public int getSpoutXPIconYPosition() { return config.getInt("Spout.XP.Icon.Y_POS", 2); }
  272. /* Spout HUD Colors */
  273. public double getSpoutRetroHUDXPBorderRed() { return config.getDouble("Spout.HUD.Retro.Colors.Border.RED", 0.0); }
  274. public double getSpoutRetroHUDXPBorderGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Border.GREEN", 0.0); }
  275. public double getSpoutRetroHUDXPBorderBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Border.BLUE", 0.0); }
  276. public double getSpoutRetroHUDXPBackgroundRed() { return config.getDouble("Spout.HUD.Retro.Colors.Background.RED", 0.75); }
  277. public double getSpoutRetroHUDXPBackgroundGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Background.GREEN", 0.75); }
  278. public double getSpoutRetroHUDXPBackgroundBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Background.BLUE", 0.75); }
  279. public double getSpoutRetroHUDAcrobaticsRed() { return config.getDouble("Spout.HUD.Retro.Colors.Acrobatics.RED", 0.3); }
  280. public double getSpoutRetroHUDAcrobaticsGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Acrobatics.GREEN", 0.3); }
  281. public double getSpoutRetroHUDAcrobaticsBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Acrobatics.BLUE", 0.75); }
  282. public double getSpoutRetroHUDArcheryRed() { return config.getDouble("Spout.HUD.Retro.Colors.Archery.RED", 0.3); }
  283. public double getSpoutRetroHUDArcheryGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Archery.GREEN", 0.3); }
  284. public double getSpoutRetroHUDArcheryBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Archery.BLUE", 0.75); }
  285. public double getSpoutRetroHUDAxesRed() { return config.getDouble("Spout.HUD.Retro.Colors.Axes.RED", 0.3); }
  286. public double getSpoutRetroHUDAxesGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Axes.GREEN", 0.3); }
  287. public double getSpoutRetroHUDAxesBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Axes.BLUE", 0.75); }
  288. public double getSpoutRetroHUDExcavationRed() { return config.getDouble("Spout.HUD.Retro.Colors.Excavation.RED", 0.3); }
  289. public double getSpoutRetroHUDExcavationGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Excavation.GREEN", 0.3); }
  290. public double getSpoutRetroHUDExcavationBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Excavation.BLUE", 0.75); }
  291. public double getSpoutRetroHUDHerbalismRed() { return config.getDouble("Spout.HUD.Retro.Colors.Herbalism.RED", 0.3); }
  292. public double getSpoutRetroHUDHerbalismGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Herbalism.GREEN", 0.3); }
  293. public double getSpoutRetroHUDHerbalismBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Herbalism.BLUE", 0.75); }
  294. public double getSpoutRetroHUDMiningRed() { return config.getDouble("Spout.HUD.Retro.Colors.Mining.RED", 0.3); }
  295. public double getSpoutRetroHUDMiningGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Mining.GREEN", 0.3); }
  296. public double getSpoutRetroHUDMiningBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Mining.BLUE", 0.75); }
  297. public double getSpoutRetroHUDRepairRed() { return config.getDouble("Spout.HUD.Retro.Colors.Repair.RED", 0.3); }
  298. public double getSpoutRetroHUDRepairGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Repair.GREEN", 0.3); }
  299. public double getSpoutRetroHUDRepairBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Repair.BLUE", 0.75); }
  300. public double getSpoutRetroHUDSwordsRed() { return config.getDouble("Spout.HUD.Retro.Colors.Swords.RED", 0.3); }
  301. public double getSpoutRetroHUDSwordsGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Swords.GREEN", 0.3); }
  302. public double getSpoutRetroHUDSwordsBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Swords.BLUE", 0.75); }
  303. public double getSpoutRetroHUDTamingRed() { return config.getDouble("Spout.HUD.Retro.Colors.Taming.RED", 0.3); }
  304. public double getSpoutRetroHUDTamingGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Taming.GREEN", 0.3); }
  305. public double getSpoutRetroHUDTamingBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Taming.BLUE", 0.75); }
  306. public double getSpoutRetroHUDUnarmedRed() { return config.getDouble("Spout.HUD.Retro.Colors.Unarmed.RED", 0.3); }
  307. public double getSpoutRetroHUDUnarmedGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Unarmed.GREEN", 0.3); }
  308. public double getSpoutRetroHUDUnarmedBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Unarmed.BLUE", 0.75); }
  309. public double getSpoutRetroHUDWoodcuttingRed() { return config.getDouble("Spout.HUD.Retro.Colors.Woodcutting.RED", 0.3); }
  310. public double getSpoutRetroHUDWoodcuttingGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Woodcutting.GREEN", 0.3); }
  311. public double getSpoutRetroHUDWoodcuttingBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Woodcutting.BLUE", 0.75); }
  312. public double getSpoutRetroHUDFishingRed() { return config.getDouble("Spout.HUD.Retro.Colors.Fishing.RED", 0.3); }
  313. public double getSpoutRetroHUDFishingGreen() { return config.getDouble("Spout.HUD.Retro.Colors.Fishing.GREEN", 0.3); }
  314. public double getSpoutRetroHUDFishingBlue() { return config.getDouble("Spout.HUD.Retro.Colors.Fishing.BLUE", 0.75); }
  315. /*
  316. * CONFIG LOADING
  317. */
  318. public HUDType defaulthud;
  319. private Config(mcMMO plugin) {
  320. super(plugin, "config.yml");
  321. config = plugin.getConfig();
  322. xpGainMultiplier = getExperienceGainsGlobalMultiplier();
  323. load();
  324. }
  325. @Override
  326. protected void load() {
  327. // If it doesn't exist, copy it from the .jar
  328. if (!configFile.exists()) {
  329. dataFolder.mkdir();
  330. plugin.saveDefaultConfig();
  331. }
  332. addDefaults();
  333. loadKeys();
  334. }
  335. @Override
  336. protected void loadKeys() {
  337. plugin.getLogger().info("Loading mcMMO config.yml File...");
  338. // Setup default HUD
  339. String temp = config.getString("Spout.HUD.Default", "STANDARD");
  340. for (HUDType x : HUDType.values()) {
  341. if (x.toString().toLowerCase().equalsIgnoreCase(temp.toString().toLowerCase())) {
  342. defaulthud = x;
  343. }
  344. }
  345. if(defaulthud == null)
  346. defaulthud = HUDType.STANDARD;
  347. }
  348. }