|
@@ -232,183 +232,6 @@ public class MainConfig extends ConfigValidated {
|
|
|
public List<String> validateKeys() {
|
|
|
// Validate all the settings!
|
|
|
List<String> reason = new ArrayList<>();
|
|
|
-
|
|
|
- /* General Settings */
|
|
|
- /*if (getSaveInterval() <= 0) {
|
|
|
- reason.add(GENERAL + SAVE_INTERVAL + " should be greater than 0!");
|
|
|
- }*/
|
|
|
-
|
|
|
- /* MySQL Settings */
|
|
|
- /*for (SQLDatabaseManager.PoolIdentifier identifier : SQLDatabaseManager.PoolIdentifier.values()) {
|
|
|
- if (getMySQLMaxConnections(identifier) <= 0) {
|
|
|
- reason.add(MY_SQL + "." + DATABASE + "." + MAX_CONNECTIONS + "." + StringUtils.getCapitalized(identifier.toString()) + " should be greater than 0!");
|
|
|
- }
|
|
|
- if (getMySQLMaxPoolSize(identifier) <= 0) {
|
|
|
- reason.add(MY_SQL + "." + DATABASE + "." + MAX_POOL_SIZE + "." + StringUtils.getCapitalized(identifier.toString()) + " should be greater than 0!");
|
|
|
- }
|
|
|
- }*/
|
|
|
-
|
|
|
- /* Mob Healthbar */
|
|
|
- if (mcMMO.getConfigManager().getConfigMobs().getCombat().getHealthBars().getDisplayTimeSeconds() == 0) {
|
|
|
- reason.add(MOB_HEALTHBAR + "." + DISPLAY_TIME + " cannot be 0! Set to -1 to disable or set a valid value.");
|
|
|
- }
|
|
|
-
|
|
|
- /* Scoreboards */
|
|
|
- /*if (getRankScoreboardTime() != -1 && getRankScoreboardTime() <= 0) {
|
|
|
- reason.add("ConfigScoreboard.Types.Rank.Display_Time should be greater than 0, or -1!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getStatsScoreboardTime() != -1 && getStatsScoreboardTime() <= 0) {
|
|
|
- reason.add("ConfigScoreboard.Types.Stats.Display_Time should be greater than 0, or -1!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getTopScoreboardTime() != -1 && getTopScoreboardTime() <= 0) {
|
|
|
- reason.add("ConfigScoreboard.Types.Top.Display_Time should be greater than 0, or -1!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getInspectScoreboardTime() != -1 && getInspectScoreboardTime() <= 0) {
|
|
|
- reason.add("ConfigScoreboard.Types.Inspect.Display_Time should be greater than 0, or -1!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getSkillScoreboardTime() != -1 && getSkillScoreboardTime() <= 0) {
|
|
|
- reason.add("ConfigScoreboard.Types.Skill.Display_Time should be greater than 0, or -1!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getSkillLevelUpTime() != -1 && getSkillScoreboardTime() <= 0) {
|
|
|
- reason.add("ConfigScoreboard.Types.Skill.Display_Time should be greater than 0, or -1!");
|
|
|
- }
|
|
|
-
|
|
|
- if (!(getRankUseChat() || getRankUseBoard())) {
|
|
|
- reason.add("Either Board or Print in ConfigScoreboard.Types.Rank must be true!");
|
|
|
- }
|
|
|
-
|
|
|
- if (!(getTopUseChat() || getTopUseBoard())) {
|
|
|
- reason.add("Either Board or Print in ConfigScoreboard.Types.Top must be true!");
|
|
|
- }
|
|
|
-
|
|
|
- if (!(getStatsUseChat() || getStatsUseBoard())) {
|
|
|
- reason.add("Either Board or Print in ConfigScoreboard.Types.Stats must be true!");
|
|
|
- }
|
|
|
-
|
|
|
- if (!(getInspectUseChat() || getInspectUseBoard())) {
|
|
|
- reason.add("Either Board or Print in ConfigScoreboard.Types.Inspect must be true!");
|
|
|
- }*/
|
|
|
-
|
|
|
- /* Hardcore Mode */
|
|
|
- if (getHardcoreDeathStatPenaltyPercentage() < 0.01 || getHardcoreDeathStatPenaltyPercentage() > 100) {
|
|
|
- reason.add(HARDCORE + "." + DEATH_STAT_LOSS + "." + PENALTY_PERCENTAGE + " only accepts values from 0.01 to 100!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getHardcoreVampirismStatLeechPercentage() < 0.01 || getHardcoreVampirismStatLeechPercentage() > 100) {
|
|
|
- reason.add(HARDCORE + "." + VAMPIRISM + "." + LEECH_PERCENTAGE + " only accepts values from 0.01 to 100!");
|
|
|
- }
|
|
|
-
|
|
|
- /* Items */
|
|
|
- if (getChimaeraUseCost() < 1 || getChimaeraUseCost() > 64) {
|
|
|
- reason.add(ITEMS + "." + CHIMAERA_WING + "." + USE_COST + " only accepts values from 1 to 64!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getChimaeraRecipeCost() < 1 || getChimaeraRecipeCost() > 9) {
|
|
|
- reason.add(ITEMS + "." + CHIMAERA_WING + "." + RECIPE_COST + " only accepts values from 1 to 9!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getChimaeraItem() == null) {
|
|
|
- reason.add(ITEMS + "." + CHIMAERA_WING + "." + ITEM + NAME + " is invalid!");
|
|
|
- }
|
|
|
-
|
|
|
- /* Particles */
|
|
|
- if (getLevelUpEffectsTier() < 1) {
|
|
|
- reason.add(PARTICLES + "." + LEVEL_UP + "Tier should be at least 1!");
|
|
|
- }
|
|
|
-
|
|
|
- /* PARTY SETTINGS */
|
|
|
- /*if (getAutoPartyKickInterval() < -1) {
|
|
|
- reason.add(PARTY + "." + AUTO_KICK_INTERVAL + " should be at least -1!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getAutoPartyKickTime() < 0) {
|
|
|
- reason.add(PARTY + "." + OLD_PARTY_MEMBER_CUTOFF + " should be at least 0!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getPartyShareBonusBase() <= 0) {
|
|
|
- reason.add(PARTY + "." + SHARING_EXP_SHARE_BONUS_BASE + " should be greater than 0!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getPartyShareBonusIncrease() < 0) {
|
|
|
- reason.add(PARTY + "." + SHARING + "." + EXP_SHARE_BONUS_INCREASE + " should be at least 0!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getPartyShareBonusCap() <= 0) {
|
|
|
- reason.add(PARTY + "." + SHARING + "." + EXP_SHARE_BONUS_CAP + " should be greater than 0!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getPartyShareRange() <= 0) {
|
|
|
- reason.add(PARTY + "." + SHARING + "." + RANGE + " should be greater than 0!");
|
|
|
- }*/
|
|
|
-
|
|
|
- /*if (getPartyXpCurveMultiplier() < 1) {
|
|
|
- reason.add(PARTY + "." + LEVELING + "." + XP_CURVE_MODIFIER + " should be at least 1!");
|
|
|
- }
|
|
|
-
|
|
|
- for (PartyFeature partyFeature : PartyFeature.values()) {
|
|
|
- if (PartyManager. < 0) {
|
|
|
- reason.add(PARTY + "." + LEVELING + "." + StringUtils.getPrettyPartyFeatureString(partyFeature).replace(" ", "") + "_UnlockLevel should be at least 0!");
|
|
|
- }
|
|
|
- }*/
|
|
|
-
|
|
|
-
|
|
|
- /*if (getTreeFellerThreshold() <= 0) {
|
|
|
- reason.add(ABILITIES + "." + LIMITS + "." + TREE_FELLER_THRESHOLD + " should be greater than 0!");
|
|
|
- }*/
|
|
|
-
|
|
|
- /*if (getRepairAnvilMaterial() == null) {
|
|
|
- reason.add(SKILLS + "." + REPAIR + "." + ANVIL + "Type is invalid!!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getSalvageAnvilMaterial() == null) {
|
|
|
- reason.add(SKILLS + "." + REPAIR + "." + SALVAGE + "_" + ANVIL + "Type is invalid!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getRepairAnvilMaterial() == getSalvageAnvilMaterial()) {
|
|
|
- reason.add("Cannot use the same item for " + REPAIR + " and " + SALVAGE + " anvils!");
|
|
|
- }*/
|
|
|
-
|
|
|
- if (getTamingCOTWMaterial(EntityType.WOLF) == null) {
|
|
|
- reason.add(SKILLS + "." + TAMING + "." + CALL_OF_THE_WILD1 + ".Wolf." + ITEM + "Material is invalid!!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getTamingCOTWMaterial(EntityType.OCELOT) == null) {
|
|
|
- reason.add(SKILLS + "." + TAMING + "." + CALL_OF_THE_WILD1 + ".Ocelot." + ITEM + "Material is invalid!!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getTamingCOTWMaterial(EntityType.HORSE) == null) {
|
|
|
- reason.add(SKILLS + "." + TAMING + "." + CALL_OF_THE_WILD1 + ".Horse." + ITEM + "Material is invalid!!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getTamingCOTWCost(EntityType.WOLF) <= 0) {
|
|
|
- reason.add(SKILLS + "." + TAMING + "." + CALL_OF_THE_WILD1 + ".Wolf." + ITEM + "Amount should be greater than 0!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getTamingCOTWCost(EntityType.OCELOT) <= 0) {
|
|
|
- reason.add(SKILLS + "." + TAMING + "." + CALL_OF_THE_WILD1 + ".Ocelot." + ITEM + "Amount should be greater than 0!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getTamingCOTWCost(EntityType.HORSE) <= 0) {
|
|
|
- reason.add(SKILLS + "." + TAMING + "." + CALL_OF_THE_WILD1 + ".Horse." + ITEM + "Amount should be greater than 0!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getTamingCOTWAmount(EntityType.WOLF) <= 0) {
|
|
|
- reason.add(SKILLS + "." + TAMING + "." + CALL_OF_THE_WILD1 + ".Wolf." + SUMMON_AMOUNT + " should be greater than 0!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getTamingCOTWAmount(EntityType.OCELOT) <= 0) {
|
|
|
- reason.add(SKILLS + "." + TAMING + "." + CALL_OF_THE_WILD1 + ".Ocelot." + SUMMON_AMOUNT + " should be greater than 0!");
|
|
|
- }
|
|
|
-
|
|
|
- if (getTamingCOTWAmount(EntityType.HORSE) <= 0) {
|
|
|
- reason.add(SKILLS + "." + TAMING + "." + CALL_OF_THE_WILD1 + ".Horse." + SUMMON_AMOUNT + " should be greater than 0!");
|
|
|
- }
|
|
|
-
|
|
|
return reason;
|
|
|
}
|
|
|
|