public int getPartyLevelCap() { int cap = config.getInt("Party.Leveling.Level_Cap", 10); return (cap <= 0) ? Integer.MAX_VALUE : cap; }
/** * This returns the maximum level at which superabilities will stop lengthening from scaling alongside skill level. * It returns a different value depending on whether or not the server is in retro mode * @return the level at which abilities stop increasing in length */ public int getAbilityLengthCap() { if(!mcMMO.isRetroModeEnabled()) return config.getInt("Skills.General.Ability.Length.Standard.CapLevel", 50); else return config.getInt("Skills.General.Ability.Length.RetroMode.CapLevel", 500); }
/** * This returns the frequency at which abilities will increase in length * It returns a different value depending on whether or not the server is in retro mode * @return the number of levels required per ability length increase */ public int getAbilityLength() { if(!mcMMO.isRetroModeEnabled()) return config.getInt("Skills.General.Ability.Length.Standard.IncreaseLevel", 5); else return config.getInt("Skills.General.Ability.Length.RetroMode.IncreaseLevel", 50); }
private String getStringIncludingInts(String key) { String str = config.getString(key); if (str == null) { str = String.valueOf(config.getInt(key)); } if (str.equals("0")) { str = "No value set for '" + key + "'"; } return str; }
public int getArmorImpactIncreaseLevel() { int increaseLevel = config.getInt("Skills.Axes.ArmorImpact.IncreaseLevel", 5); if(mcMMO.isRetroModeEnabled()) return increaseLevel * 10; return increaseLevel; }
public int getTamingXP(EntityType type) { return config.getInt("Experience.Taming.Animal_Taming." + StringUtils.getPrettyEntityTypeString(type)); } }
private void setFields() { this.maxDepth = getConfig().getInt("Abilities.Earth.Tremorsense.MaxDepth"); this.radius = getConfig().getInt("Abilities.Earth.Tremorsense.Radius"); this.lightThreshold = (byte) getConfig().getInt("Abilities.Earth.Tremorsense.LightThreshold"); this.cooldown = getConfig().getLong("Abilities.Earth.Tremorsense.Cooldown"); this.stickyRange = getConfig().getInt("Abilities.Earth.Tremorsense.StickyRange"); }
public int getLevelCap(PrimarySkillType skill) { int cap = config.getInt("Skills." + StringUtils.getCapitalized(skill.toString()) + ".Level_Cap"); return (cap <= 0) ? Integer.MAX_VALUE : cap; }
/** * Returns the unlock level for a subskill depending on the gamemode * @param key root address of the subskill in the rankskills.yml file * @param rank the rank we are checking * @return the level requirement for a subskill at this particular rank */ private int findRankByRootAddress(int rank, String key) { String scalingKey = Config.getInstance().getIsRetroMode() ? ".RetroMode." : ".Standard."; String targetRank = "Rank_" + rank; key += scalingKey; key += targetRank; return config.getInt(key); }
private String replacePlaceholers(String string, String warp, Faction faction) { string = ChatColor.translateAlternateColorCodes('&', string); string = string.replace("{warp}", warp); string = string.replace("{warp-protected}", faction.hasWarpPassword(warp) ? "Enabled" : "Disabled"); string = string.replace("{warp-cost}", !SavageFactions.plugin.getConfig().getBoolean("warp-cost.enabled", false) ? "Disabled" : Integer.toString(SavageFactions.plugin.getConfig().getInt("warp-cost.warp", 5))); return string; }
private void setFields() { this.height = this.bPlayer.isAvatarState() ? getConfig().getInt("Abilities.Avatar.AvatarState.Earth.Collapse.Column.Height") : getConfig().getInt("Abilities.Earth.Collapse.Column.Height"); this.selectRange = getConfig().getInt("Abilities.Earth.Collapse.SelectRange"); this.speed = getConfig().getDouble("Abilities.Earth.Collapse.Speed"); this.cooldown = getConfig().getLong("Abilities.Earth.Collapse.Column.Cooldown"); this.direction = new Vector(0, -1, 0); this.affectedBlocks = new ConcurrentHashMap<>(); }
public int getMaxBonusLevel(AbstractSubSkill abstractSubSkill) { int maxBonusLevel = config.getInt("Skills."+abstractSubSkill.getPrimaryKeyName()+"."+abstractSubSkill.getConfigKeyName()+".MaxBonusLevel"); if(mcMMO.isRetroModeEnabled()) maxBonusLevel *= 10; return maxBonusLevel; }
public Integer getRespawnProtectionTime() { FileConfiguration config = this.getConfig(); if (config.contains("respawn-protection") && config.isInt("respawn-protection")) { return config.getInt("respawn-protection"); } return 0; }
public int getIntConfig(String key, int defaultInt) { FileConfiguration config = this.getConfig(); if (config.contains(key) && config.isInt(key)) { return config.getInt(key); } return defaultInt; }
public Integer getRespawnProtectionTime() { FileConfiguration config = this.getConfig(); if (config.contains("respawn-protection") && config.isInt("respawn-protection")) { return config.getInt("respawn-protection"); } return 0; }
/** * Returns the max length of a game in seconds * * @return The length of the game in seconds */ public int getMaxLength() { if (this.getConfig().contains("gamelength") && this.getConfig().isInt("gamelength")) { return this.getConfig().getInt("gamelength") * 60; } // fallback time is 60 minutes return 60 * 60; }
private NPCHider() { npcs = new HashMap<>(); updateInterval = BetonQuest.getInstance().getConfig().getInt("hidden_npcs_check_interval", 5 * 20); hider = new EntityHider(BetonQuest.getInstance(), EntityHider.Policy.BLACKLIST); loadFromConfig(); runTaskTimer(BetonQuest.getInstance(), 0, updateInterval); Bukkit.getPluginManager().registerEvents(this, BetonQuest.getInstance()); }
public void setFields() { this.cooldown = getConfig().getLong("Abilities.Water.HealingWaters.Cooldown"); this.range = getConfig().getDouble("Abilities.Water.HealingWaters.Range"); this.interval = getConfig().getLong("Abilities.Water.HealingWaters.Interval"); this.chargeTime = getConfig().getLong("Abilities.Water.HealingWaters.ChargeTime"); this.power = getConfig().getInt("Abilities.Water.HealingWaters.Power"); this.potDuration = getConfig().getInt("Abilities.Water.HealingWaters.HealingDuration"); this.duration = getConfig().getLong("Abilities.Water.HealingWaters.Duration"); this.enableParticles = getConfig().getBoolean("Abilities.Water.HealingWaters.EnableParticles"); this.hex = "00ffff"; }