mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
Misc code fixes
This commit is contained in:
@ -687,9 +687,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
public double getMaximumProbability(SubSkillType subSkillType) {
|
||||
double maximumProbability = config.getDouble(subSkillType.getAdvConfigAddress() + ".ChanceMax", 100.0D);
|
||||
|
||||
return maximumProbability;
|
||||
return config.getDouble(subSkillType.getAdvConfigAddress() + ".ChanceMax", 100.0D);
|
||||
}
|
||||
|
||||
public double getMaximumProbability(AbstractSubSkill abstractSubSkill)
|
||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||
public abstract class ConfigLoader {
|
||||
protected static final mcMMO plugin = mcMMO.p;
|
||||
protected String fileName;
|
||||
private File configFile;
|
||||
private final File configFile;
|
||||
protected FileConfiguration config;
|
||||
|
||||
public ConfigLoader(String relativePath, String fileName) {
|
||||
|
@ -7,7 +7,7 @@ import java.io.InputStreamReader;
|
||||
|
||||
public class HiddenConfig {
|
||||
private static HiddenConfig instance;
|
||||
private String fileName;
|
||||
private final String fileName;
|
||||
private YamlConfiguration config;
|
||||
private boolean chunkletsEnabled;
|
||||
private int conversionRate;
|
||||
|
@ -13,7 +13,7 @@ public class RankConfig extends AutoUpdateConfigLoader {
|
||||
{
|
||||
super("skillranks.yml");
|
||||
validate();
|
||||
this.instance = this;
|
||||
instance = this;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -9,7 +9,7 @@ public class SoundConfig extends AutoUpdateConfigLoader {
|
||||
{
|
||||
super("sounds.yml");
|
||||
validate();
|
||||
this.instance = this;
|
||||
instance = this;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -11,7 +11,7 @@ import java.util.ArrayList;
|
||||
*/
|
||||
public class WorldBlacklist {
|
||||
private static ArrayList<String> blacklist;
|
||||
private mcMMO plugin;
|
||||
private final mcMMO plugin;
|
||||
|
||||
private final String blackListFileName = "world_blacklist.txt";
|
||||
|
||||
|
@ -18,16 +18,16 @@ import java.util.Map;
|
||||
public class PotionConfig extends ConfigLoader {
|
||||
private static PotionConfig instance;
|
||||
|
||||
private List<ItemStack> concoctionsIngredientsTierOne = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierTwo = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierThree = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierFour = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierFive = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierSix = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierSeven = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierEight = new ArrayList<ItemStack>();
|
||||
private final List<ItemStack> concoctionsIngredientsTierOne = new ArrayList<ItemStack>();
|
||||
private final List<ItemStack> concoctionsIngredientsTierTwo = new ArrayList<ItemStack>();
|
||||
private final List<ItemStack> concoctionsIngredientsTierThree = new ArrayList<ItemStack>();
|
||||
private final List<ItemStack> concoctionsIngredientsTierFour = new ArrayList<ItemStack>();
|
||||
private final List<ItemStack> concoctionsIngredientsTierFive = new ArrayList<ItemStack>();
|
||||
private final List<ItemStack> concoctionsIngredientsTierSix = new ArrayList<ItemStack>();
|
||||
private final List<ItemStack> concoctionsIngredientsTierSeven = new ArrayList<ItemStack>();
|
||||
private final List<ItemStack> concoctionsIngredientsTierEight = new ArrayList<ItemStack>();
|
||||
|
||||
private Map<String, AlchemyPotion> potionMap = new HashMap<String, AlchemyPotion>();
|
||||
private final Map<String, AlchemyPotion> potionMap = new HashMap<String, AlchemyPotion>();
|
||||
|
||||
private PotionConfig() {
|
||||
super("potions.yml");
|
||||
@ -280,8 +280,7 @@ public class PotionConfig extends ConfigLoader {
|
||||
green += color.getGreen();
|
||||
blue += color.getBlue();
|
||||
}
|
||||
Color color = Color.fromRGB(red/colors.size(), green/colors.size(), blue/colors.size());
|
||||
return color;
|
||||
return Color.fromRGB(red/colors.size(), green/colors.size(), blue/colors.size());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import java.util.*;
|
||||
|
||||
public class RepairConfig extends ConfigLoader {
|
||||
private List<Repairable> repairables;
|
||||
private HashSet<String> notSupported;
|
||||
private final HashSet<String> notSupported;
|
||||
|
||||
public RepairConfig(String fileName) {
|
||||
super(fileName);
|
||||
|
@ -18,7 +18,7 @@ import java.util.*;
|
||||
|
||||
public class SalvageConfig extends ConfigLoader {
|
||||
private List<Salvageable> salvageables;
|
||||
private HashSet<String> notSupported;
|
||||
private final HashSet<String> notSupported;
|
||||
|
||||
public SalvageConfig(String fileName) {
|
||||
super(fileName);
|
||||
|
Reference in New Issue
Block a user