mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
These fit better in SkillTools. Plus, we had already duplicated one of
them.
This commit is contained in:
parent
d0d9527d39
commit
1da1bb7218
@ -12,7 +12,6 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.utilities.SkillTools;
|
||||
import com.gmail.nossr50.skills.utilities.SkillType;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.Users;
|
||||
|
||||
@ -124,7 +123,7 @@ public abstract class SkillCommand implements CommandExecutor {
|
||||
|
||||
protected String[] calculateLengthDisplayValues() {
|
||||
int maxLength = skill.getAbility().getMaxTicks();
|
||||
int length = 2 + (int) (skillValue / Misc.abilityLengthIncreaseLevel);
|
||||
int length = 2 + (int) (skillValue / SkillTools.abilityLengthIncreaseLevel);
|
||||
int enduranceLength = 0;
|
||||
|
||||
if (player.hasPermission("mcmmo.perks.activationtime.twelveseconds")) {
|
||||
|
@ -33,8 +33,9 @@ import com.gmail.nossr50.util.Users;
|
||||
|
||||
public class SkillTools {
|
||||
static AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||
public static int abilityLengthIncreaseLevel = advancedConfig.getAbilityLength();
|
||||
public static boolean abilitiesEnabled = Config.getInstance().getAbilitiesEnabled();
|
||||
public static int toolDurabilityLoss = Config.getInstance().getAbilityToolDamage();
|
||||
public static int abilityLengthIncreaseLevel = AdvancedConfig.getInstance().getAbilityLength();
|
||||
|
||||
public static final int LUCKY_SKILL_ACTIVATION_CHANCE = 75;
|
||||
public static final int NORMAL_SKILL_ACTIVATION_CHANCE = 100;
|
||||
|
@ -17,6 +17,7 @@ import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mods.ModChecks;
|
||||
import com.gmail.nossr50.mods.datatypes.CustomBlock;
|
||||
import com.gmail.nossr50.skills.utilities.CombatTools;
|
||||
import com.gmail.nossr50.skills.utilities.SkillTools;
|
||||
import com.gmail.nossr50.skills.utilities.SkillType;
|
||||
import com.gmail.nossr50.skills.woodcutting.Woodcutting.ExperienceGainMethod;
|
||||
import com.gmail.nossr50.util.BlockChecks;
|
||||
@ -142,7 +143,7 @@ public final class TreeFeller {
|
||||
|
||||
for (Block block : treeFellerBlocks) {
|
||||
if (BlockChecks.isLog(block) && Misc.getRandom().nextInt(unbreakingLevel + 1) == 0) {
|
||||
durabilityLoss += Misc.toolDurabilityLoss;
|
||||
durabilityLoss += SkillTools.toolDurabilityLoss;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.events.fake.FakeBlockBreakEvent;
|
||||
import com.gmail.nossr50.events.fake.FakeBlockDamageEvent;
|
||||
@ -22,8 +21,6 @@ import com.gmail.nossr50.mods.ModChecks;
|
||||
|
||||
public final class Misc {
|
||||
private static Random random = new Random();
|
||||
public static int toolDurabilityLoss = Config.getInstance().getAbilityToolDamage();
|
||||
public static int abilityLengthIncreaseLevel = AdvancedConfig.getInstance().getAbilityLength();
|
||||
public static boolean isSpawnerXPEnabled = Config.getInstance().getExperienceGainsMobspawnersEnabled();
|
||||
public static final int PLAYER_RESPAWN_COOLDOWN_SECONDS = 5;
|
||||
public static final int TIME_CONVERSION_FACTOR = 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user