public Double getProbability(InvasionMobs mob) { if (mob.getInvasionSpecialEvent() == InvasionSpecialEvent.NONE) { return probabilitys.get(mob); } else { return -999.0; } }
public void parseMobs(Main pl) { for (InvasionMobs mobs : InvasionMobs.values()) { if (pl.getRoundsConfig().contains(round + "." + mobs.toString().toLowerCase())) { probabilitys.put( mobs, pl.getRoundsConfig() .getDouble(round + "." + mobs.toString().toLowerCase(), mobs.getChance())); } else { pl.getRoundsConfig().set(round + "." + mobs.toString().toLowerCase(), mobs.getChance()); probabilitys.put( mobs, pl.getRoundsConfig() .getDouble(round + "." + mobs.toString().toLowerCase(), mobs.getChance())); } } }