Config.java 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. package com.gmail.nossr50.config;
  2. import java.util.Set;
  3. import org.bukkit.configuration.ConfigurationSection;
  4. public class Config extends ConfigLoader {
  5. private static Config instance;
  6. public double xpGainMultiplier = 1;
  7. private Config() {
  8. super("config.yml");
  9. xpGainMultiplier = getExperienceGainsGlobalMultiplier();
  10. loadKeys();
  11. }
  12. public static Config getInstance() {
  13. if (instance == null) {
  14. instance = new Config();
  15. }
  16. return instance;
  17. }
  18. @Override
  19. protected void loadKeys() {}
  20. /*
  21. * GENERAL SETTINGS
  22. */
  23. /* General Settings */
  24. public String getLocale() { return config.getString("General.Locale", "en_us"); }
  25. public boolean getMOTDEnabled() { return config.getBoolean("General.MOTD_Enabled", true); }
  26. public int getSaveInterval() { return config.getInt("General.Save_Interval", 10); }
  27. public boolean getStatsTrackingEnabled() { return config.getBoolean("General.Stats_Tracking", true); }
  28. public boolean getEventCallbackEnabled() { return config.getBoolean("General.Event_Callback", true); }
  29. /* mySQL */
  30. public boolean getUseMySQL() { return config.getBoolean("MySQL.Enabled", false); }
  31. public String getMySQLTablePrefix() { return config.getString("MySQL.Database.TablePrefix", "mcmmo_"); }
  32. public String getMySQLDatabaseName() { return getStringIncludingInts(config, "MySQL.Database.Name"); }
  33. public String getMySQLUserName() { return getStringIncludingInts(config, "MySQL.Database.User_Name"); }
  34. public int getMySQLServerPort() { return config.getInt("MySQL.Server.Port", 3306); }
  35. public String getMySQLServerName() { return config.getString("MySQL.Server.Address", "localhost"); }
  36. public String getMySQLUserPassword() {
  37. if (getStringIncludingInts(config, "MySQL.Database.User_Password") != null) {
  38. return getStringIncludingInts(config, "MySQL.Database.User_Password");
  39. }
  40. return "";
  41. }
  42. private static String getStringIncludingInts(ConfigurationSection cfg, String key) {
  43. String str = cfg.getString(key);
  44. if (str == null)
  45. str = String.valueOf(cfg.getInt(key));
  46. if (str == null)
  47. str = "No value set for '" + key + "'";
  48. return str;
  49. }
  50. /* Hardcore Mode */
  51. public boolean getHardcoreEnabled() { return config.getBoolean("Hardcore.Enabled", false); }
  52. public double getHardcoreDeathStatPenaltyPercentage() { return config.getDouble("Hardcore.Death_Stat_Loss_Penalty_Percentage", 75); }
  53. public double getHardcoreVampirismStatLeechPercentage() { return config.getDouble("Hardcore.Vampirism_Stat_Leech_Percentage", 5); }
  54. public boolean getHardcoreVampirismEnabled() { return config.getBoolean("Hardcore.Vampirism", false); }
  55. /* SMP Mods */
  56. public boolean getToolModsEnabled() { return config.getBoolean("Mods.Tool_Mods_Enabled", false); }
  57. public boolean getArmorModsEnabled() { return config.getBoolean("Mods.Tool_Mods_Enabled", false); }
  58. public boolean getBlockModsEnabled() { return config.getBoolean("Mods.Block_Mods_Enabled", false); }
  59. /* Commands */
  60. public boolean getCommandXPLockEnabled() { return config.getBoolean("Commands.xplock.Enabled", true); }
  61. public boolean getCommandXPRateEnabled() { return config.getBoolean("Commands.xprate.Enabled", true); }
  62. public boolean getCommandMCTopEnabled() { return config.getBoolean("Commands.mctop.Enabled", true); }
  63. public boolean getCommandAddXPEnabled() { return config.getBoolean("Commands.addxp.Enabled", true); }
  64. public boolean getCommandAddLevelsEnabled() { return config.getBoolean("Commands.addlevels.Enabled", true); }
  65. public boolean getCommandMCAbilityEnabled() { return config.getBoolean("Commands.mcability.Enabled", true); }
  66. public boolean getCommandMCRefreshEnabled() { return config.getBoolean("Commands.mcrefresh.Enabled", true); }
  67. public boolean getCommandmcMMOEnabled() { return config.getBoolean("Commands.mcmmo.Enabled", true); }
  68. public boolean getCommandMCCEnabled() { return config.getBoolean("Commands.mcc.Enabled", true); }
  69. public boolean getCommandMCGodEnabled() { return config.getBoolean("Commands.mcgod.Enabled", true); }
  70. public boolean getCommandMCStatsEnabled() { return config.getBoolean("Commands.mcstats.Enabled", true); }
  71. public boolean getCommandSkillResetEnabled() { return config.getBoolean("Commands.skillreset.Enabled", true); }
  72. public boolean getCommandMmoeditEnabled() { return config.getBoolean("Commands.mmoedit.Enabled", true); }
  73. public boolean getCommandMCRemoveEnabled() { return config.getBoolean("Commands.mcremove.Enable", true); }
  74. public boolean getCommandPTPEnabled() { return config.getBoolean("Commands.ptp.Enabled", true); }
  75. public boolean getCommandPartyEnabled() { return config.getBoolean("Commands.party.Enabled", true); }
  76. public boolean getCommandInspectEnabled() { return config.getBoolean("Commands.inspect.Enabled", true); }
  77. public boolean getCommandInviteEnabled() { return config.getBoolean("Commands.invite.Enabled", true); }
  78. public boolean getCommandAcceptEnabled() { return config.getBoolean("Commands.accept.Enabled", true); }
  79. public boolean getCommandAdminChatAEnabled() { return config.getBoolean("Commands.a.Enabled", true); }
  80. public boolean getCommandPartyChatPEnabled() { return config.getBoolean("Commands.p.Enabled", true); }
  81. public int getPTPCommandCooldown() { return config.getInt("Commands.ptp.Cooldown", 30); }
  82. public boolean getDonateMessageEnabled() { return config.getBoolean("Commands.mcmmo.Donate_Message", true); }
  83. /* Items */
  84. public int getChimaeraCost() { return config.getInt("Items.Chimaera_Wing.Feather_Cost", 10); }
  85. public int getChimaeraItemId() { return config.getInt("Items.Chimaera_Wing.Item_ID", 288); }
  86. public boolean getChimaeraEnabled() { return config.getBoolean("Items.Chimaera_Wing.Enabled", true); }
  87. /*
  88. * ABILITY SETTINGS
  89. */
  90. /* General Settings */
  91. public boolean getAbilityMessagesEnabled() { return config.getBoolean("Abilities.Messages", true); }
  92. public boolean getAbilitiesEnabled() { return config.getBoolean("Abilities.Enabled", true); }
  93. public boolean getAbilitiesOnlyActivateWhenSneaking() { return config.getBoolean("Abilities.Activation.Only_Activate_When_Sneaking", false); }
  94. /* Durability Settings */
  95. public boolean getAbilitiesDamageTools() { return config.getBoolean("Abilities.Tools.Durability_Loss_Enabled", true); }
  96. public int getAbilityToolDamage() { return config.getInt("Abilities.Tools.Durability_Loss", 2); }
  97. /* Cooldowns */
  98. public int getAbilityCooldownGreenTerra() { return config.getInt("Abilities.Cooldowns.Green_Terra", 240); }
  99. public int getAbilityCooldownSuperBreaker() { return config.getInt("Abilities.Cooldowns.Super_Breaker", 240); }
  100. public int getAbilityCooldownGigaDrillBreaker() { return config.getInt("Abilities.Cooldowns.Giga_Drill_Breaker", 240); }
  101. public int getAbilityCooldownTreeFeller() { return config.getInt("Abilities.Cooldowns.Tree_Feller", 240); }
  102. public int getAbilityCooldownBerserk() { return config.getInt("Abilities.Cooldowns.Berserk", 240); }
  103. public int getAbilityCooldownSerratedStrikes() { return config.getInt("Abilities.Cooldowns.Serrated_Strikes", 240); }
  104. public int getAbilityCooldownSkullSplitter() { return config.getInt("Abilities.Cooldowns.Skull_Splitter", 240); }
  105. public int getAbilityCooldownBlastMining() { return config.getInt("Abilities.Cooldowns.Blast_Mining", 60); }
  106. /* Max ticks */
  107. public int getAbilityMaxTicksGreenTerra() { return config.getInt("Abilities.Max_Seconds.Green_Terra", 0); }
  108. public int getAbilityMaxTicksSuperBreaker() { return config.getInt("Abilities.Max_Seconds.Super_Breaker", 0); }
  109. public int getAbilityMaxTicksGigaDrillBreaker() { return config.getInt("Abilities.Max_Seconds.Giga_Drill_Breaker", 0); }
  110. public int getAbilityMaxTicksTreeFeller() { return config.getInt("Abilities.Max_Seconds.Tree_Feller", 0); }
  111. public int getAbilityMaxTicksBerserk() { return config.getInt("Abilities.Max_Seconds.Berserk", 0); }
  112. public int getAbilityMaxTicksSerratedStrikes() { return config.getInt("Abilities.Max_Seconds.Serrated_Strikes", 0); }
  113. public int getAbilityMaxTicksSkullSplitter() { return config.getInt("Abilities.Max_Seconds.Skull_Splitter", 0); }
  114. public int getAbilityMaxTicksBlastMining() { return config.getInt("Abilities.Max_Seconds.Blast_Mining", 0); }
  115. /* Thresholds */
  116. public int getTreeFellerThreshold() { return config.getInt("Abilities.Limits.Tree_Feller_Threshold", 500); }
  117. /*
  118. * SKILL SETTINGS
  119. */
  120. /* Tool Requirements */
  121. public boolean getMiningRequiresTool() { return config.getBoolean("Skills.Mining.Requires_Pickaxe", true); }
  122. public boolean getExcavationRequiresTool() { return config.getBoolean("Skills.Excavation.Requires_Shovel", true); }
  123. public boolean getWoodcuttingRequiresTool() { return config.getBoolean("Skills.Woodcutting.Requires_Axe", true); }
  124. /* Excavation */
  125. public int getExcavationBaseXP() { return config.getInt("Experience.Excavation.Base", 40); }
  126. /* Fishing */
  127. public int getFishingBaseXP() { return config.getInt("Experience.Fishing.Base", 800); }
  128. public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
  129. /* Herbalism */
  130. public int getHerbalismXPSugarCane() { return config.getInt("Experience.Herbalism.Sugar_Cane", 30); }
  131. public int getHerbalismXPWheat() { return config.getInt("Experience.Herbalism.Wheat", 50); }
  132. public int getHerbalismXPCactus() { return config.getInt("Experience.Herbalism.Cactus", 30); }
  133. public int getHerbalismXPPumpkin() { return config.getInt("Experience.Herbalism.Pumpkin", 20); }
  134. public int getHerbalismXPFlowers() { return config.getInt("Experience.Herbalism.Flowers", 100); }
  135. public int getHerbalismXPMushrooms() { return config.getInt("Experience.Herbalism.Mushrooms", 150); }
  136. public int getHerbalismXPMelon() { return config.getInt("Experience.Herbalism.Melon", 20); }
  137. public int getHerbalismXPNetherWart() { return config.getInt("Experience.Herbalism.Nether_Wart", 50); }
  138. public int getHerbalismXPLilyPads() { return config.getInt("Experience.Herbalism.Lily_Pads", 100); }
  139. public int getHerbalismXPVines() { return config.getInt("Experience.Herbalism.Vines", 10); }
  140. public int getHerbalismXPCocoa() { return config.getInt("Experience.Herbalism.Cocoa", 30); }
  141. public int getHerbalismXPCarrot() { return config.getInt("Experience.Herbalism.Carrot", 50); }
  142. public int getHerbalismXPPotato() { return config.getInt("Experience.Herbalism.Potato", 50); }
  143. public boolean getHerbalismGreenThumbCobbleToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true); }
  144. public boolean getHerbalismGreenThumbCobbleWallToMossyWall() { return config.getBoolean("Skills.Herbalism.Green_Thumb.CobbleWall_To_MossyWall", true); }
  145. public boolean getHerbalismGreenThumbSmoothbrickToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true); }
  146. public boolean getHerbalismGreenThumbDirtToGrass() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Dirt_To_Grass", true); }
  147. public boolean getBrownMushroomsDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Brown_Mushrooms", true); }
  148. public boolean getCactiDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Cacti", true); }
  149. public boolean getWheatDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Wheat", true); }
  150. public boolean getMelonsDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Melons", true); }
  151. public boolean getNetherWartsDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Nether_Warts", true); }
  152. public boolean getPumpkinsDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Pumpkins", true); }
  153. public boolean getRedMushroomsDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Red_Mushrooms", true); }
  154. public boolean getRedRosesDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Red_Roses", true); }
  155. public boolean getSugarCaneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Sugar_Cane", true); }
  156. public boolean getVinesDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Vines", true); }
  157. public boolean getWaterLiliesDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Water_Lilies", true); }
  158. public boolean getYellowFlowersDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Yellow_Flowers", true); }
  159. public boolean getCocoaDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Cocoa", true); }
  160. public boolean getCarrotDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Carrot", true); }
  161. public boolean getPotatoDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Potato", true); }
  162. public boolean herbalismDoubleDropsDisabled() {
  163. return doubleDropsDisabled("Herbalism");
  164. }
  165. /* Mining */
  166. public int getMiningXPGoldOre() { return config.getInt("Experience.Mining.Gold", 250); }
  167. public int getMiningXPDiamondOre() { return config.getInt("Experience.Mining.Diamond", 750); }
  168. public int getMiningXPIronOre() { return config.getInt("Experience.Mining.Iron", 250); }
  169. public int getMiningXPRedstoneOre() { return config.getInt("Experience.Mining.Redstone", 150); }
  170. public int getMiningXPLapisOre() { return config.getInt("Experience.Mining.Lapis", 400); }
  171. public int getMiningXPObsidian() { return config.getInt("Experience.Mining.Obsidian", 150); }
  172. public int getMiningXPNetherrack() { return config.getInt("Experience.Mining.Netherrack", 30); }
  173. public int getMiningXPGlowstone() { return config.getInt("Experience.Mining.Glowstone", 30); }
  174. public int getMiningXPCoalOre() { return config.getInt("Experience.Mining.Coal", 100); }
  175. public int getMiningXPStone() { return config.getInt("Experience.Mining.Stone", 30); }
  176. public int getMiningXPSandstone() { return config.getInt("Experience.Mining.Sandstone", 30); }
  177. public int getMiningXPEndStone() { return config.getInt("Experience.Mining.End_Stone", 150); }
  178. public int getMiningXPMossyStone() { return config.getInt("Experience.Mining.Moss_Stone", 30); }
  179. public int getMiningXPEmeraldOre() { return config.getInt("Experience.Mining.Emerald", 1000); }
  180. public boolean getCoalDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Coal", true); }
  181. public boolean getDiamondDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Diamond", true); }
  182. public boolean getEndStoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.End_Stone", true); }
  183. public boolean getGlowstoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Glowstone", true); }
  184. public boolean getGoldDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Gold", true); }
  185. public boolean getIronDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Iron", true); }
  186. public boolean getLapisDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Lapis", true); }
  187. public boolean getMossyCobblestoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Moss_Stone", true); }
  188. public boolean getNetherrackDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Netherrack", true); }
  189. public boolean getObsidianDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Obsidian", true); }
  190. public boolean getRedstoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Redstone", true); }
  191. public boolean getSandstoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Sandstone", true); }
  192. public boolean getStoneDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Stone", true); }
  193. public boolean getEmeraldDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Mining.Emerald", true); }
  194. public boolean miningDoubleDropsDisabled() {
  195. return doubleDropsDisabled("Mining");
  196. }
  197. public int getDetonatorItemID() { return config.getInt("Skills.Mining.Detonator_ID", 259); }
  198. /* Repair */
  199. public boolean getRepairAnvilMessagesEnabled() { return config.getBoolean("Skills.Repair.Anvil_Messages", true); }
  200. public int getRepairAnvilId() { return config.getInt("Skills.Repair.Anvil_ID", 42); }
  201. public boolean getSalvageEnabled() { return config.getBoolean("Skills.Repair.Salvage_enabled", true); }
  202. public int getSalvageAnvilId() { return config.getInt("Skills.Repair.Salvage_Anvil_ID", 41); }
  203. public int getSalvageUnlockLevel() { return config.getInt("Skills.Repair.Salvage_UnlockLevel", 600); }
  204. public boolean getSalvageTools() { return config.getBoolean("Skills.Repair.Salvage_tools", true); }
  205. public boolean getSalvageArmor() { return config.getBoolean("Skills.Repair.Salvage_armor", true); }
  206. /* Taming */
  207. public int getTamingXPWolf() { return config.getInt("Experience.Taming.Animal_Taming.Wolf", 250); }
  208. public int getTamingXPOcelot() { return config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); }
  209. public int getTamingCOTWWolfCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); }
  210. public int getTamingCOTWOcelotCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Fish_Required", 10); }
  211. /* Woodcutting */
  212. public int getWoodcuttingXPOak() { return config.getInt("Experience.Woodcutting.Oak", 70); }
  213. public int getWoodcuttingXPBirch() { return config.getInt("Experience.Woodcutting.Birch", 90); }
  214. public int getWoodcuttingXPSpruce() { return config.getInt("Experience.Woodcutting.Spruce", 80); }
  215. public int getWoodcuttingXPJungle() { return config.getInt("Experience.Woodcutting.Jungle", 100); }
  216. public boolean getOakDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Oak", true); }
  217. public boolean getBirchDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Birch", true); }
  218. public boolean getSpruceDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Spruce", true); }
  219. public boolean getJungleDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Jungle", true); }
  220. public boolean woodcuttingDoubleDropsDisabled() {
  221. return doubleDropsDisabled("Woodcutting");
  222. }
  223. /* AFK Leveling */
  224. public boolean getAcrobaticsAFKDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_AFK_Leveling", true); }
  225. public boolean getHerbalismAFKDisabled() { return config.getBoolean("Skills.Herbalism.Prevent_AFK_Leveling", true); }
  226. /* Level Caps */
  227. public int getLevelCapAcrobatics() {
  228. return getLevelCap("Skills.Acrobatics.Level_Cap");
  229. }
  230. public int getLevelCapArchery() {
  231. return getLevelCap("Skills.Archery.Level_Cap");
  232. }
  233. public int getLevelCapAxes() {
  234. return getLevelCap("Skills.Axes.Level_Cap");
  235. }
  236. public int getLevelCapExcavation() {
  237. return getLevelCap("Skills.Excavation.Level_Cap");
  238. }
  239. public int getLevelCapFishing() {
  240. return getLevelCap("Skills.Fishing.Level_Cap");
  241. }
  242. public int getLevelCapHerbalism() {
  243. return getLevelCap("Skills.Herbalism.Level_Cap");
  244. }
  245. public int getLevelCapMining() {
  246. return getLevelCap("Skills.Mining.Level_Cap");
  247. }
  248. public int getLevelCapRepair() {
  249. return getLevelCap("Skills.Repair.Level_Cap");
  250. }
  251. public int getLevelCapSwords() {
  252. return getLevelCap("Skills.Swords.Level_Cap");
  253. }
  254. public int getLevelCapTaming() {
  255. return getLevelCap("Skills.Taming.Level_Cap");
  256. }
  257. public int getLevelCapUnarmed() {
  258. return getLevelCap("Skills.Unarmed.Level_Cap");
  259. }
  260. public int getLevelCapWoodcutting() {
  261. return getLevelCap("Skills.Woodcutting.Level_Cap");
  262. }
  263. public int getPowerLevelCap() {
  264. return getLevelCap("General.Power_Level_Cap");
  265. }
  266. /* PVP & PVE Settings */
  267. public boolean getAcrobaticsPVP() { return config.getBoolean("Skills.Acrobatics.Enabled_For_PVP", true); }
  268. public boolean getAcrobaticsPVE() { return config.getBoolean("Skills.Acrobatics.Enabled_For_PVE", true); }
  269. public boolean getArcheryPVP() { return config.getBoolean("Skills.Archery.Enabled_For_PVP", true); }
  270. public boolean getArcheryPVE() { return config.getBoolean("Skills.Archery.Enabled_For_PVE", true); }
  271. public boolean getAxesPVP() { return config.getBoolean("Skills.Axes.Enabled_For_PVP", true); }
  272. public boolean getAxesPVE() { return config.getBoolean("Skills.Axes.Enabled_For_PVE", true); }
  273. public boolean getSwordsPVP() { return config.getBoolean("Skills.Swords.Enabled_For_PVP", true); }
  274. public boolean getSwordsPVE() { return config.getBoolean("Skills.Swords.Enabled_For_PVE", true); }
  275. public boolean getTamingPVP() { return config.getBoolean("Skills.Taming.Enabled_For_PVP", true); }
  276. public boolean getTamingPVE() { return config.getBoolean("Skills.Taming.Enabled_For_PVE", true); }
  277. public boolean getUnarmedPVP() { return config.getBoolean("Skills.Unarmed.Enabled_For_PVP", true); }
  278. public boolean getUnarmedPVE() { return config.getBoolean("Skills.Unarmed.Enabled_For_PVE", true); }
  279. /*
  280. * XP SETTINGS
  281. */
  282. /* General Settings */
  283. public boolean getExperienceGainsMobspawnersEnabled() { return config.getBoolean("Experience.Gains.Mobspawners.Enabled", false); }
  284. public boolean getExperienceGainsPlayerVersusPlayerEnabled() { return config.getBoolean("Experience.PVP.Rewards", true); }
  285. public double getExperienceGainsGlobalMultiplier() { return config.getDouble("Experience.Gains.Multiplier.Global", 1.0); }
  286. /* Combat XP Multipliers */
  287. public double getPlayerVersusPlayerXP() { return config.getDouble("Experience.Gains.Multiplier.PVP", 1.0); }
  288. public double getAnimalsXP() { return config.getDouble("Experience.Combat.Multiplier.Animals", 1.0); }
  289. public double getCreeperXP() { return config.getDouble("Experience.Combat.Multiplier.Creeper", 4.0); }
  290. public double getSkeletonXP() { return config.getDouble("Experience.Combat.Multiplier.Skeleton", 2.0); }
  291. public double getSpiderXP() { return config.getDouble("Experience.Combat.Multiplier.Spider", 3.0); }
  292. public double getGhastXP() { return config.getDouble("Experience.Combat.Multiplier.Ghast", 3.0); }
  293. public double getSlimeXP() { return config.getDouble("Experience.Combat.Multiplier.Slime", 2.0); }
  294. public double getZombieXP() { return config.getDouble("Experience.Combat.Multiplier.Zombie", 2.0); }
  295. public double getPigZombieXP() { return config.getDouble("Experience.Combat.Multiplier.Pig_Zombie", 3.0); }
  296. public double getEndermanXP() { return config.getDouble("Experience.Combat.Multiplier.Enderman", 2.0); }
  297. public double getCaveSpiderXP() { return config.getDouble("Experience.Combat.Multiplier.Cave_Spider", 3.0); }
  298. public double getSilverfishXP() { return config.getDouble("Experience.Combat.Multiplier.Silverfish", 3.0); }
  299. public double getBlazeXP() { return config.getDouble("Experience.Combat.Multiplier.Blaze", 3.0); }
  300. public double getMagmaCubeXP() { return config.getDouble("Experience.Combat.Multiplier.Magma_Cube", 2.0); }
  301. public double getEnderDragonXP() { return config.getDouble("Experience.Combat.Multiplier.Ender_Dragon", 8.0); }
  302. public double getIronGolemXP() { return config.getDouble("Experience.Combat.Multiplier.Iron_Golem", 2.0); }
  303. public double getGiantXP() { return config.getDouble("Experience.Combat.Multiplier.Giant", 4.0); }
  304. public double getWitherXP() { return config.getDouble("Experience.Combat.Multiplier.Wither", 7.0); }
  305. public double getWitherSkeletonXP() { return config.getDouble("Experience.Combat.Multiplier.Wither_Skeleton", 4.0); }
  306. public double getWitchXP() { return config.getDouble("Experience.Combat.Multiplier.Witch", 4.0); }
  307. /* XP Formula Multiplier */
  308. public int getFormulaMultiplierCurve() { return config.getInt("Experience.Formula.Curve_Modifier", 20); }
  309. public double getFormulaMultiplierTaming() { return config.getDouble("Experience.Formula.Multiplier.Taming", 1.0); }
  310. public double getFormulaMultiplierMining() { return config.getDouble("Experience.Formula.Multiplier.Mining", 1.0); }
  311. public double getFormulaMultiplierRepair() { return config.getDouble("Experience.Formula.Multiplier.Repair", 1.0); }
  312. public double getFormulaMultiplierWoodcutting() { return config.getDouble("Experience.Formula.Multiplier.Woodcutting", 1.0); }
  313. public double getFormulaMultiplierUnarmed() { return config.getDouble("Experience.Formula.Multiplier.Unarmed", 1.0); }
  314. public double getFormulaMultiplierHerbalism() { return config.getDouble("Experience.Formula.Multiplier.Herbalism", 1.0); }
  315. public double getFormulaMultiplierExcavation() { return config.getDouble("Experience.Formula.Multiplier.Excavation", 1.0); }
  316. public double getFormulaMultiplierArchery() { return config.getDouble("Experience.Formula.Multiplier.Archery", 1.0); }
  317. public double getFormulaMultiplierSwords() { return config.getDouble("Experience.Formula.Multiplier.Swords", 1.0); }
  318. public double getFormulaMultiplierAxes() { return config.getDouble("Experience.Formula.Multiplier.Axes", 1.0); }
  319. public double getFormulaMultiplierAcrobatics() { return config.getDouble("Experience.Formula.Multiplier.Acrobatics", 1.0); }
  320. public double getFormulaMultiplierFishing() { return config.getDouble("Experience.Formula.Multiplier.Fishing", 1.0); }
  321. private boolean doubleDropsDisabled(String skillName) {
  322. ConfigurationSection section = config.getConfigurationSection("Double_Drops." + skillName);
  323. Set<String> keys = section.getKeys(false);
  324. boolean disabled = true;
  325. for (String key : keys) {
  326. if (config.getBoolean("Double_Drops." + skillName + "." + key)) {
  327. disabled = false;
  328. break;
  329. }
  330. }
  331. return disabled;
  332. }
  333. private int getLevelCap(String configString) {
  334. int cap = config.getInt(configString, 0);
  335. return ((cap <= 0) ? Integer.MAX_VALUE : cap);
  336. }
  337. }