Config.java 26 KB

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