2012-04-26 16:32:38 +02:00
|
|
|
package com.gmail.nossr50.config;
|
|
|
|
|
2012-05-01 21:56:09 +02:00
|
|
|
import java.util.Set;
|
|
|
|
|
2013-02-20 22:44:15 +01:00
|
|
|
import org.bukkit.Material;
|
2012-05-01 21:56:09 +02:00
|
|
|
import org.bukkit.configuration.ConfigurationSection;
|
2013-02-20 22:44:15 +01:00
|
|
|
import org.bukkit.entity.EntityType;
|
|
|
|
|
2013-04-05 04:11:11 +02:00
|
|
|
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
2013-03-01 06:52:01 +01:00
|
|
|
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
|
|
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
2013-02-20 22:44:15 +01:00
|
|
|
import com.gmail.nossr50.util.StringUtils;
|
2012-05-01 21:56:09 +02:00
|
|
|
|
2013-02-24 06:18:01 +01:00
|
|
|
public class Config extends AutoUpdateConfigLoader {
|
2012-04-28 08:38:16 +02:00
|
|
|
private static Config instance;
|
2012-07-03 21:57:24 +02:00
|
|
|
|
|
|
|
private Config() {
|
|
|
|
super("config.yml");
|
|
|
|
}
|
2012-04-27 16:39:08 +02:00
|
|
|
|
2012-04-27 05:58:21 +02:00
|
|
|
public static Config getInstance() {
|
2012-04-27 16:54:51 +02:00
|
|
|
if (instance == null) {
|
2012-07-03 21:57:24 +02:00
|
|
|
instance = new Config();
|
2012-04-27 16:54:51 +02:00
|
|
|
}
|
|
|
|
|
2012-04-27 05:58:21 +02:00
|
|
|
return instance;
|
|
|
|
}
|
2012-04-26 16:32:38 +02:00
|
|
|
|
2012-07-03 21:57:24 +02:00
|
|
|
@Override
|
|
|
|
protected void loadKeys() {}
|
|
|
|
|
2012-04-26 16:32:38 +02:00
|
|
|
/*
|
|
|
|
* GENERAL SETTINGS
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* General Settings */
|
2012-04-27 05:58:21 +02:00
|
|
|
public String getLocale() { return config.getString("General.Locale", "en_us"); }
|
|
|
|
public boolean getMOTDEnabled() { return config.getBoolean("General.MOTD_Enabled", true); }
|
2013-02-01 19:34:33 +01:00
|
|
|
public boolean getDonateMessageEnabled() { return config.getBoolean("Commands.mcmmo.Donate_Message", true); }
|
2012-04-27 05:58:21 +02:00
|
|
|
public int getSaveInterval() { return config.getInt("General.Save_Interval", 10); }
|
|
|
|
public boolean getStatsTrackingEnabled() { return config.getBoolean("General.Stats_Tracking", true); }
|
2013-02-18 22:54:47 +01:00
|
|
|
public boolean getUpdateCheckEnabled() { return config.getBoolean("General.Update_Check", true); }
|
|
|
|
public boolean getPreferBeta() { return config.getBoolean("General.Prefer_Beta", false); }
|
2012-04-27 05:58:21 +02:00
|
|
|
public boolean getEventCallbackEnabled() { return config.getBoolean("General.Event_Callback", true); }
|
2013-02-15 13:50:32 +01:00
|
|
|
public boolean getBackupsEnabled() { return config.getBoolean("General.Generate_Backups", true); }
|
2013-02-20 17:47:08 +01:00
|
|
|
public boolean getVerboseLoggingEnabled() { return config.getBoolean("General.Verbose_Logging", false); }
|
2013-02-22 17:59:56 +01:00
|
|
|
public boolean getConfigOverwriteEnabled() { return config.getBoolean("General.Config_Update_Overwrite", true); }
|
2013-02-24 06:18:01 +01:00
|
|
|
|
2013-02-02 00:59:22 +01:00
|
|
|
public boolean getPartyDisplayNames() { return config.getBoolean("Commands.p.Use_Display_Names", true); }
|
|
|
|
public boolean getAdminDisplayNames() { return config.getBoolean("Commands.a.Use_Display_Names", true); }
|
2013-01-14 06:25:31 +01:00
|
|
|
|
2013-04-05 04:11:11 +02:00
|
|
|
/* Mob Healthbar */
|
|
|
|
public MobHealthbarType getMobHealthbarDefault() {
|
|
|
|
try {
|
|
|
|
return MobHealthbarType.valueOf(config.getString("Mob_Healthbar.Display_Type", "HEARTS").toUpperCase().trim());
|
|
|
|
}
|
|
|
|
catch (IllegalArgumentException ex) {
|
|
|
|
return MobHealthbarType.HEARTS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getMobHealthbarTime() { return config.getInt("Mob_Healthbar.Display_Time", 3); }
|
|
|
|
|
mcMMO - Now with 100% more scoreboards!
mcMMO now allows for the use of scoreboards to display information in
several instances. By default, all scoreboards are enabled in the config,
and will only display for 10 seconds. After 10 seconds, the scoreboard
will go away and revert to the previously displayed scoreboard, if one
exists.
A global scoreboard now exists for tracking all player stats, and will be
displayed when /mctop is used. Your name will be highlighted in gold when
looking through the scoreboard. Additionally, the scoreboard will display
players in groups of 15, rather than groups of 10 like in chat.
Unfortunately, due to the limitations of scoreboards, the player's rank
will not be displayed in front of their name.
The scoreboard area is now also used for displaying data for /mcrank,
/inspect. and /mcstats. Due to the way scoreboards are handled, the power
level is not guarenteed to show up at any given location in the
scoreboard, but is instead displayed in gold so that it can be easily
found.
Lastly, the scoreboard area is also now used for displaying current data
on skills when the relevant /<skillname> command is used. The effects and
ability stats will still be shown in chat, but the current level, xp, and
remaining xp will be shown in the scoreboard.
2013-04-14 05:16:25 +02:00
|
|
|
/* Scoreboards */
|
|
|
|
public boolean getMcrankScoreboardEnabled() { return config.getBoolean("Scoreboards.Mcrank.Use", true); }
|
|
|
|
public int getMcrankScoreboardTime() { return config.getInt("Scoreboards.Mcrank.Display_Time", 10); }
|
|
|
|
|
|
|
|
public boolean getMcstatsScoreboardsEnabled() { return config.getBoolean("Scoreboards.Mcstats.Use", true); }
|
2013-04-30 14:20:16 +02:00
|
|
|
public int getMcstatsScoreboardTime() { return config.getInt("Scoreboards.Mcstats.Display_Time", 10); }
|
mcMMO - Now with 100% more scoreboards!
mcMMO now allows for the use of scoreboards to display information in
several instances. By default, all scoreboards are enabled in the config,
and will only display for 10 seconds. After 10 seconds, the scoreboard
will go away and revert to the previously displayed scoreboard, if one
exists.
A global scoreboard now exists for tracking all player stats, and will be
displayed when /mctop is used. Your name will be highlighted in gold when
looking through the scoreboard. Additionally, the scoreboard will display
players in groups of 15, rather than groups of 10 like in chat.
Unfortunately, due to the limitations of scoreboards, the player's rank
will not be displayed in front of their name.
The scoreboard area is now also used for displaying data for /mcrank,
/inspect. and /mcstats. Due to the way scoreboards are handled, the power
level is not guarenteed to show up at any given location in the
scoreboard, but is instead displayed in gold so that it can be easily
found.
Lastly, the scoreboard area is also now used for displaying current data
on skills when the relevant /<skillname> command is used. The effects and
ability stats will still be shown in chat, but the current level, xp, and
remaining xp will be shown in the scoreboard.
2013-04-14 05:16:25 +02:00
|
|
|
|
|
|
|
public boolean getMctopScoreboardEnabled() { return config.getBoolean("Scoreboards.Mctop.Use", true); }
|
|
|
|
public int getMctopScoreboardTime() { return config.getInt("Scoreboards.Mctop.Display_Time", 10); }
|
|
|
|
|
|
|
|
public boolean getInspectScoreboardEnabled() { return config.getBoolean("Scoreboards.Inspect.Use", true); }
|
|
|
|
public int getInspectScoreboardTime() { return config.getInt("Scoreboards.Inspect.Display_Time", 10); }
|
|
|
|
|
|
|
|
public boolean getSkillScoreboardEnabled() { return config.getBoolean("Scoreboards.Skillname.Use", true); }
|
|
|
|
public int getSkillScoreboardTime() { return config.getInt("Scoreboards.Skillname.Display_Time", 10); }
|
|
|
|
|
2013-05-18 11:12:18 +02:00
|
|
|
public boolean getPowerLevelsEnabled() { return config.getBoolean("Scoreboards.Power_Level.Use", false); }
|
2013-05-15 21:13:11 +02:00
|
|
|
|
2013-01-14 06:25:31 +01:00
|
|
|
/* Database Purging */
|
|
|
|
public int getPurgeInterval() { return config.getInt("Database_Purging.Purge_Interval", -1); }
|
|
|
|
public int getOldUsersCutoff() { return config.getInt("Database_Purging.Old_User_Cutoff", 6); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
|
|
|
/* mySQL */
|
2012-04-27 05:58:21 +02:00
|
|
|
public boolean getUseMySQL() { return config.getBoolean("MySQL.Enabled", false); }
|
|
|
|
public String getMySQLTablePrefix() { return config.getString("MySQL.Database.TablePrefix", "mcmmo_"); }
|
2012-12-28 11:40:15 +01:00
|
|
|
public String getMySQLDatabaseName() { return getStringIncludingInts(config, "MySQL.Database.Name"); }
|
|
|
|
public String getMySQLUserName() { return getStringIncludingInts(config, "MySQL.Database.User_Name"); }
|
2012-04-27 05:58:21 +02:00
|
|
|
public int getMySQLServerPort() { return config.getInt("MySQL.Server.Port", 3306); }
|
|
|
|
public String getMySQLServerName() { return config.getString("MySQL.Server.Address", "localhost"); }
|
2012-04-30 04:58:54 +02:00
|
|
|
|
|
|
|
public String getMySQLUserPassword() {
|
2012-12-28 11:40:15 +01:00
|
|
|
if (getStringIncludingInts(config, "MySQL.Database.User_Password") != null) {
|
|
|
|
return getStringIncludingInts(config, "MySQL.Database.User_Password");
|
2012-04-26 16:32:38 +02:00
|
|
|
}
|
2013-01-10 04:43:21 +01:00
|
|
|
|
|
|
|
return "";
|
2012-04-26 16:32:38 +02:00
|
|
|
}
|
2012-05-01 07:14:32 +02:00
|
|
|
|
2012-12-28 11:40:15 +01:00
|
|
|
private static String getStringIncludingInts(ConfigurationSection cfg, String key) {
|
2013-01-21 23:22:54 +01:00
|
|
|
String str = cfg.getString(key);
|
2013-02-20 22:44:15 +01:00
|
|
|
|
|
|
|
if (str == null) {
|
2013-01-21 23:22:54 +01:00
|
|
|
str = String.valueOf(cfg.getInt(key));
|
2013-02-20 22:44:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (str == "0") {
|
2013-01-21 23:22:54 +01:00
|
|
|
str = "No value set for '" + key + "'";
|
2013-02-20 22:44:15 +01:00
|
|
|
}
|
2013-01-21 23:22:54 +01:00
|
|
|
return str;
|
|
|
|
}
|
2012-12-28 11:40:15 +01:00
|
|
|
|
2012-04-30 15:21:14 +02:00
|
|
|
/* Hardcore Mode */
|
|
|
|
public boolean getHardcoreEnabled() { return config.getBoolean("Hardcore.Enabled", false); }
|
2013-02-13 14:15:38 +01:00
|
|
|
public void setHardcoreEnabled(boolean enabled) { config.set("Hardcore.Enabled", enabled); }
|
|
|
|
|
|
|
|
public double getHardcoreDeathStatPenaltyPercentage() { return config.getDouble("Hardcore.Death_Stat_Loss_Penalty_Percentage", 75.0); }
|
|
|
|
public void setHardcoreDeathStatPenaltyPercentage(double value) { config.set("Hardcore.Death_Stat_Loss_Penalty_Percentage", value); }
|
|
|
|
|
|
|
|
public double getHardcoreVampirismStatLeechPercentage() { return config.getDouble("Hardcore.Vampirism_Stat_Leech_Percentage", 5.0); }
|
|
|
|
public void setHardcoreVampirismStatLeechPercentage(double value) { config.set("Hardcore.Vampirism_Stat_Leech_Percentage", value); }
|
|
|
|
|
2012-04-30 15:21:14 +02:00
|
|
|
public boolean getHardcoreVampirismEnabled() { return config.getBoolean("Hardcore.Vampirism", false); }
|
2013-02-13 14:15:38 +01:00
|
|
|
public void setHardcoreVampirismEnabled(boolean enabled) { config.set("Hardcore.Vampirism", enabled); }
|
2012-05-04 20:04:42 +02:00
|
|
|
|
|
|
|
/* SMP Mods */
|
|
|
|
public boolean getToolModsEnabled() { return config.getBoolean("Mods.Tool_Mods_Enabled", false); }
|
2012-05-15 22:12:59 +02:00
|
|
|
public boolean getArmorModsEnabled() { return config.getBoolean("Mods.Tool_Mods_Enabled", false); }
|
2012-05-04 20:04:42 +02:00
|
|
|
public boolean getBlockModsEnabled() { return config.getBoolean("Mods.Block_Mods_Enabled", false); }
|
2013-02-06 04:40:19 +01:00
|
|
|
public boolean getEntityModsEnabled() { return config.getBoolean("Mods.Entity_Mods_Enabled", false); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
2013-02-15 16:36:14 +01:00
|
|
|
/* Items */
|
2013-03-08 21:46:05 +01:00
|
|
|
public int getChimaeraUseCost() { return config.getInt("Items.Chimaera_Wing.Use_Cost", 1); }
|
|
|
|
public int getChimaeraRecipeCost() { return config.getInt("Items.Chimaera_Wing.Recipe_Cost", 5); }
|
2013-02-15 16:36:14 +01:00
|
|
|
public int getChimaeraItemId() { return config.getInt("Items.Chimaera_Wing.Item_ID", 288); }
|
|
|
|
public boolean getChimaeraEnabled() { return config.getBoolean("Items.Chimaera_Wing.Enabled", true); }
|
2013-03-08 21:46:05 +01:00
|
|
|
public boolean getChimaeraPreventUseUnderground() { return config.getBoolean("Items.Chimaera_Wing.Prevent_Use_Underground", true); }
|
|
|
|
public int getChimaeraCooldown() { return config.getInt("Items.Chimaera_Wing.Cooldown", 240); }
|
2013-03-22 00:38:15 +01:00
|
|
|
public int getChimaeraWarmup() { return config.getInt("Items.Chimaera_Wing.Warmup", 5); }
|
2013-04-10 17:08:27 +02:00
|
|
|
public int getChimaeraRecentlyHurtCooldown() { return config.getInt("Items.Chimaera_Wing.RecentlyHurt_Cooldown", 60); }
|
2013-02-15 16:36:14 +01:00
|
|
|
|
2013-02-24 19:56:24 +01:00
|
|
|
/* Particles */
|
|
|
|
public boolean getAbilityActivationEffectEnabled() { return config.getBoolean("Particles.Ability_Activation", true); }
|
|
|
|
public boolean getAbilityDeactivationEffectEnabled() { return config.getBoolean("Particles.Ability_Deactivation", true); }
|
|
|
|
public boolean getDodgeEffectEnabled() { return config.getBoolean("Particles.Dodge", true); }
|
|
|
|
public boolean getBleedEffectEnabled() { return config.getBoolean("Particles.Bleed", true); }
|
|
|
|
public boolean getGreaterImpactEffectEnabled() { return config.getBoolean("Particles.Greater_Impact", true); }
|
2013-04-02 13:08:07 +02:00
|
|
|
public boolean getLevelUpEffectsEnabled() { return config.getBoolean("Particles.LevelUp_Enabled", true); }
|
|
|
|
public int getLevelUpEffectsTier() { return config.getInt("Particles.LevelUp_Tier", 100); }
|
2013-05-14 03:17:38 +02:00
|
|
|
public boolean getLargeFireworks() { return config.getBoolean("Particles.LargeFireworks", true); }
|
2013-02-24 19:56:24 +01:00
|
|
|
|
2013-02-04 16:36:47 +01:00
|
|
|
/* PARTY SETTINGS */
|
2013-02-05 00:42:19 +01:00
|
|
|
public int getAutoPartyKickInterval() { return config.getInt("Party.AutoKick_Interval", 12); }
|
|
|
|
public int getAutoPartyKickTime() { return config.getInt("Party.Old_Party_Member_Cutoff", 7); }
|
2013-02-04 16:36:47 +01:00
|
|
|
public boolean getExpShareEnabled() { return config.getBoolean("Party.Sharing.ExpShare_enabled", true); }
|
2013-02-04 17:20:45 +01:00
|
|
|
public double getPartyShareBonusBase() { return config.getDouble("Party.Sharing.ExpShare_bonus_base", 1.1); }
|
|
|
|
public double getPartyShareBonusIncrease() { return config.getDouble("Party.Sharing.ExpShare_bonus_increase", 0.05); }
|
|
|
|
public double getPartyShareBonusCap() { return config.getDouble("Party.Sharing.ExpShare_bonus_cap", 1.5); }
|
2013-02-04 16:36:47 +01:00
|
|
|
public boolean getItemShareEnabled() { return config.getBoolean("Party.Sharing.ItemShare_enabled", true); }
|
|
|
|
public double getPartyShareRange() { return config.getDouble("Party.Sharing.Range", 75.0); }
|
|
|
|
|
2013-02-01 19:34:33 +01:00
|
|
|
/* Party Teleport Settings */
|
2013-04-10 16:39:37 +02:00
|
|
|
public int getPTPCommandCooldown() { return config.getInt("Commands.ptp.Cooldown", 120); }
|
|
|
|
public int getPTPCommandWarmup() { return config.getInt("Commands.ptp.Warmup", 5); }
|
2013-04-10 17:08:27 +02:00
|
|
|
public int getPTPCommandRecentlyHurtCooldown() { return config.getInt("Commands.ptp.RecentlyHurt_Cooldown", 60); }
|
2013-01-28 21:24:55 +01:00
|
|
|
public int getPTPCommandTimeout() { return config.getInt("Commands.ptp.Request_Timeout", 300); }
|
|
|
|
public boolean getPTPCommandConfirmRequired() { return config.getBoolean("Commands.ptp.Confirm_Required", true); }
|
2013-02-04 00:40:29 +01:00
|
|
|
public boolean getPTPCommandWorldPermissions() { return config.getBoolean("Commands.ptp.World_Based_Permissions", false); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
2013-05-17 01:31:12 +02:00
|
|
|
/* Inspect command distance */
|
|
|
|
public double getInspectDistance() { return config.getDouble("Commands.inspect.Max_Distance", 30); }
|
|
|
|
|
2012-04-26 16:32:38 +02:00
|
|
|
/*
|
|
|
|
* ABILITY SETTINGS
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* General Settings */
|
2012-04-27 05:58:21 +02:00
|
|
|
public boolean getAbilityMessagesEnabled() { return config.getBoolean("Abilities.Messages", true); }
|
|
|
|
public boolean getAbilitiesEnabled() { return config.getBoolean("Abilities.Enabled", true); }
|
|
|
|
public boolean getAbilitiesOnlyActivateWhenSneaking() { return config.getBoolean("Abilities.Activation.Only_Activate_When_Sneaking", false); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
2013-02-20 22:44:15 +01:00
|
|
|
public int getCooldown(AbilityType ability) { return config.getInt("Abilities.Cooldowns." + ability.toString()); }
|
|
|
|
public int getMaxTicks(AbilityType ability) { return config.getInt("Abilities.Max_Seconds." + ability.toString()); }
|
|
|
|
|
2012-04-26 16:32:38 +02:00
|
|
|
/* Durability Settings */
|
2012-04-27 05:58:21 +02:00
|
|
|
public boolean getAbilitiesDamageTools() { return config.getBoolean("Abilities.Tools.Durability_Loss_Enabled", true); }
|
|
|
|
public int getAbilityToolDamage() { return config.getInt("Abilities.Tools.Durability_Loss", 2); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
|
|
|
/* Thresholds */
|
2012-04-27 05:58:21 +02:00
|
|
|
public int getTreeFellerThreshold() { return config.getInt("Abilities.Limits.Tree_Feller_Threshold", 500); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* SKILL SETTINGS
|
|
|
|
*/
|
|
|
|
|
2013-02-20 22:44:15 +01:00
|
|
|
public int getXp(SkillType skill, Material material) { return config.getInt("Experience." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_")); }
|
|
|
|
public boolean getDoubleDropsEnabled(SkillType skill, Material material) { return config.getBoolean("Double_Drops." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_")); }
|
|
|
|
|
|
|
|
public boolean getDoubleDropsDisabled(SkillType skill) {
|
|
|
|
String skillName = StringUtils.getCapitalized(skill.toString());
|
|
|
|
ConfigurationSection section = config.getConfigurationSection("Double_Drops." + skillName);
|
|
|
|
Set<String> keys = section.getKeys(false);
|
|
|
|
boolean disabled = true;
|
|
|
|
|
|
|
|
for (String key : keys) {
|
|
|
|
if (config.getBoolean("Double_Drops." + skillName + "." + key)) {
|
|
|
|
disabled = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return disabled;
|
|
|
|
}
|
2012-04-26 16:32:38 +02:00
|
|
|
|
2013-02-20 22:44:15 +01:00
|
|
|
/* Acrobatics */
|
|
|
|
public boolean getDodgeLightningDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_Dodge_Lightning", false); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
|
|
|
/* Fishing */
|
2012-04-27 05:58:21 +02:00
|
|
|
public int getFishingBaseXP() { return config.getInt("Experience.Fishing.Base", 800); }
|
2013-01-11 00:21:18 +01:00
|
|
|
public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
|
|
|
/* Mining */
|
2012-04-27 05:58:21 +02:00
|
|
|
public int getDetonatorItemID() { return config.getInt("Skills.Mining.Detonator_ID", 259); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
|
|
|
/* Repair */
|
2012-04-27 05:58:21 +02:00
|
|
|
public boolean getRepairAnvilMessagesEnabled() { return config.getBoolean("Skills.Repair.Anvil_Messages", true); }
|
|
|
|
public int getRepairAnvilId() { return config.getInt("Skills.Repair.Anvil_ID", 42); }
|
2012-11-13 16:50:00 +01:00
|
|
|
public int getSalvageAnvilId() { return config.getInt("Skills.Repair.Salvage_Anvil_ID", 41); }
|
|
|
|
public boolean getSalvageTools() { return config.getBoolean("Skills.Repair.Salvage_tools", true); }
|
|
|
|
public boolean getSalvageArmor() { return config.getBoolean("Skills.Repair.Salvage_armor", true); }
|
2013-04-25 23:29:49 +02:00
|
|
|
public boolean getRepairConfirmRequired() { return config.getBoolean("Skills.Repair.Confirm_Required", true); }
|
2012-04-27 05:58:21 +02:00
|
|
|
|
2013-02-14 06:34:50 +01:00
|
|
|
/* Unarmed */
|
|
|
|
public boolean getUnarmedBlockCrackerSmoothbrickToCracked() { return config.getBoolean("Skills.Unarmed.Block_Cracker.SmoothBrick_To_CrackedBrick", true); }
|
|
|
|
|
2012-04-26 16:32:38 +02:00
|
|
|
/* Taming */
|
2012-04-27 05:58:21 +02:00
|
|
|
public int getTamingXPWolf() { return config.getInt("Experience.Taming.Animal_Taming.Wolf", 250); }
|
|
|
|
public int getTamingXPOcelot() { return config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); }
|
|
|
|
public int getTamingCOTWWolfCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); }
|
|
|
|
public int getTamingCOTWOcelotCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Fish_Required", 10); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
|
|
|
/* Woodcutting */
|
2012-04-27 05:58:21 +02:00
|
|
|
public int getWoodcuttingXPOak() { return config.getInt("Experience.Woodcutting.Oak", 70); }
|
|
|
|
public int getWoodcuttingXPBirch() { return config.getInt("Experience.Woodcutting.Birch", 90); }
|
|
|
|
public int getWoodcuttingXPSpruce() { return config.getInt("Experience.Woodcutting.Spruce", 80); }
|
|
|
|
public int getWoodcuttingXPJungle() { return config.getInt("Experience.Woodcutting.Jungle", 100); }
|
2013-02-16 00:32:49 +01:00
|
|
|
public int getWoodcuttingXPHugeBrownMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Brown", 70); }
|
|
|
|
public int getWoodcuttingXPHugeRedMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Red", 70); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
2012-05-01 07:14:32 +02:00
|
|
|
public boolean getOakDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Oak", true); }
|
|
|
|
public boolean getBirchDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Birch", true); }
|
|
|
|
public boolean getSpruceDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Spruce", true); }
|
|
|
|
public boolean getJungleDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Jungle", true); }
|
|
|
|
|
2012-11-08 03:41:18 +01:00
|
|
|
/* AFK Leveling */
|
|
|
|
public boolean getAcrobaticsAFKDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_AFK_Leveling", true); }
|
|
|
|
public boolean getHerbalismAFKDisabled() { return config.getBoolean("Skills.Herbalism.Prevent_AFK_Leveling", true); }
|
|
|
|
|
2012-04-26 16:32:38 +02:00
|
|
|
/* Level Caps */
|
2013-02-20 22:44:15 +01:00
|
|
|
public int getPowerLevelCap() {
|
|
|
|
int cap = config.getInt("General.Power_Level_Cap", 0);
|
|
|
|
return (cap <= 0) ? Integer.MAX_VALUE : cap;
|
2012-12-27 22:45:27 +01:00
|
|
|
}
|
|
|
|
|
2013-02-20 22:44:15 +01:00
|
|
|
public int getLevelCap(SkillType skill) {
|
|
|
|
int cap = config.getInt("Skills." + StringUtils.getCapitalized(skill.toString()) + ".Level_Cap");
|
|
|
|
return (cap <= 0) ? Integer.MAX_VALUE : cap;
|
2012-12-27 04:54:20 +01:00
|
|
|
}
|
2012-04-26 16:32:38 +02:00
|
|
|
|
2012-05-02 04:42:45 +02:00
|
|
|
/* PVP & PVE Settings */
|
2013-02-20 22:44:15 +01:00
|
|
|
public boolean getPVPEnabled(SkillType skill) { return config.getBoolean("Skills." + StringUtils.getCapitalized(skill.toString()) + ".Enabled_For_PVP", true); }
|
|
|
|
public boolean getPVEEnabled(SkillType skill) { return config.getBoolean("Skills." + StringUtils.getCapitalized(skill.toString()) + ".Enabled_For_PVE", true); }
|
2012-05-02 04:42:45 +02:00
|
|
|
|
2012-04-26 16:32:38 +02:00
|
|
|
/*
|
|
|
|
* XP SETTINGS
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* General Settings */
|
2012-04-27 05:58:21 +02:00
|
|
|
public boolean getExperienceGainsPlayerVersusPlayerEnabled() { return config.getBoolean("Experience.PVP.Rewards", true); }
|
2013-02-20 22:44:15 +01:00
|
|
|
|
2012-08-02 01:32:25 +02:00
|
|
|
public double getExperienceGainsGlobalMultiplier() { return config.getDouble("Experience.Gains.Multiplier.Global", 1.0); }
|
2013-01-26 23:01:55 +01:00
|
|
|
public void setExperienceGainsGlobalMultiplier(double value) { config.set("Experience.Gains.Multiplier.Global", value); }
|
2012-04-26 16:32:38 +02:00
|
|
|
|
|
|
|
/* Combat XP Multipliers */
|
2012-04-27 05:58:21 +02:00
|
|
|
public double getPlayerVersusPlayerXP() { return config.getDouble("Experience.Gains.Multiplier.PVP", 1.0); }
|
2013-02-20 22:44:15 +01:00
|
|
|
public double getCombatXP(EntityType entity) { return config.getDouble("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
|
|
|
|
2012-04-27 05:58:21 +02:00
|
|
|
public double getAnimalsXP() { return config.getDouble("Experience.Combat.Multiplier.Animals", 1.0); }
|
2012-12-31 04:51:26 +01:00
|
|
|
public double getWitherSkeletonXP() { return config.getDouble("Experience.Combat.Multiplier.Wither_Skeleton", 4.0); }
|
2013-02-20 22:44:15 +01:00
|
|
|
|
2013-05-26 17:51:05 +02:00
|
|
|
public double getSpawnedMobXpMultiplier() { return config.getDouble("Experience.Gains.Mobspawners.Multiplier", 0.0); }
|
2013-05-15 06:31:00 +02:00
|
|
|
|
2012-04-26 16:32:38 +02:00
|
|
|
/* XP Formula Multiplier */
|
2012-05-02 15:10:32 +02:00
|
|
|
public int getFormulaMultiplierCurve() { return config.getInt("Experience.Formula.Curve_Modifier", 20); }
|
2013-05-20 10:55:17 +02:00
|
|
|
public double getFormulaSkillModifier(SkillType skill) { return config.getDouble("Experience.Formula.Modifier." + StringUtils.getCapitalized(skill.toString())); }
|
2012-05-01 19:52:44 +02:00
|
|
|
}
|