mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Move validation to proper location
This commit is contained in:
parent
ccbffca278
commit
7683dfc436
@ -116,7 +116,7 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
if (getPartyShareBonusIncrease() < 0) {
|
||||
reason.add("Party.Sharing.ExpShare_bonus_increase should be greater than or equal to 0!");
|
||||
reason.add("Party.Sharing.ExpShare_bonus_increase should be at least 0!");
|
||||
}
|
||||
|
||||
if (getPartyShareBonusCap() <= 0) {
|
||||
@ -168,28 +168,36 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Fish_Required should be at least 1!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWAmount(EntityType.OCELOT) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWAmount(EntityType.WOLF) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getExperienceGainsGlobalMultiplier() <= 0) {
|
||||
reason.add("Experience.Gains.Multiplier.Global should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getPlayerVersusPlayerXP() < 0) {
|
||||
reason.add("Experience.Gains.Multiplier.PVP should be greater than 0!");
|
||||
reason.add("Experience.Gains.Multiplier.PVP should be at least 0!");
|
||||
}
|
||||
|
||||
if (getAnimalsXP() < 0) {
|
||||
reason.add("Experience.Gains.Multiplier.Animals should be greater than 0!");
|
||||
reason.add("Experience.Gains.Multiplier.Animals should be at least 0!");
|
||||
}
|
||||
|
||||
if (getWitherSkeletonXP() < 0) {
|
||||
reason.add("Experience.Gains.Multiplier.Wither_Skeleton should be greater than 0!");
|
||||
reason.add("Experience.Gains.Multiplier.Wither_Skeleton should be at least 0!");
|
||||
}
|
||||
|
||||
if (getSpawnedMobXpMultiplier() < 0) {
|
||||
reason.add("Experience.Gains.Mobspawners.Multiplier should be greater than 0!");
|
||||
reason.add("Experience.Gains.Mobspawners.Multiplier should be at least 0!");
|
||||
}
|
||||
|
||||
if (getFormulaMultiplierCurve() < 0) {
|
||||
reason.add("Experience.Formula.Curve_Modifier should be greater than 0!");
|
||||
reason.add("Experience.Formula.Curve_Modifier should be at least 0!");
|
||||
}
|
||||
|
||||
// Check if there were any errors
|
||||
|
@ -184,11 +184,6 @@ public class TamingManager extends SkillManager {
|
||||
|
||||
int amount = Config.getInstance().getTamingCOTWAmount(type);
|
||||
|
||||
// TODO: Validate in config instead
|
||||
if (amount <= 0) {
|
||||
amount = 1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < amount; i++) {
|
||||
LivingEntity entity = (LivingEntity) player.getWorld().spawnEntity(player.getLocation(), type);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user