mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-30 12:44:45 +02:00
Major cleanup
This commit is contained in:
@ -17,7 +17,7 @@ import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.Combat;
|
||||
import com.gmail.nossr50.skills.SkillType;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
import com.gmail.nossr50.skills.SkillTools;
|
||||
import com.gmail.nossr50.util.BlockChecks;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.ModChecks;
|
||||
@ -42,13 +42,13 @@ public abstract class TreeFeller {
|
||||
if (treeFellerReachedThreshold) {
|
||||
treeFellerReachedThreshold = false;
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Woodcutting.Skills.TreeFellerThreshold"));
|
||||
player.sendMessage(LocaleLoader.getString("Woodcutting.SkillTools.TreeFellerThreshold"));
|
||||
return;
|
||||
}
|
||||
|
||||
// If the tool can't sustain the durability loss
|
||||
if (!handleDurabilityLoss(treeFellerBlocks, player)) {
|
||||
player.sendMessage(LocaleLoader.getString("Woodcutting.Skills.TreeFeller.Splinter"));
|
||||
player.sendMessage(LocaleLoader.getString("Woodcutting.SkillTools.TreeFeller.Splinter"));
|
||||
|
||||
int health = player.getHealth();
|
||||
|
||||
@ -223,7 +223,7 @@ public abstract class TreeFeller {
|
||||
|
||||
// Do we really have to check the permission here?
|
||||
if (Permissions.woodcutting(player)) {
|
||||
Skills.xpProcessing(player, Users.getProfile(player), SkillType.WOODCUTTING, xp);
|
||||
SkillTools.xpProcessing(player, Users.getProfile(player), SkillType.WOODCUTTING, xp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,14 +15,14 @@ import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||
import com.gmail.nossr50.events.fake.FakePlayerAnimationEvent;
|
||||
import com.gmail.nossr50.skills.SkillType;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
import com.gmail.nossr50.skills.SkillTools;
|
||||
import com.gmail.nossr50.spout.SpoutSounds;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.ModChecks;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.Users;
|
||||
|
||||
public abstract class Woodcutting {
|
||||
public final class Woodcutting {
|
||||
public static final int DOUBLE_DROP_MAX_LEVEL = AdvancedConfig.getInstance().getMiningDoubleDropMaxLevel();
|
||||
public static final double DOUBLE_DROP_CHANCE = AdvancedConfig.getInstance().getMiningDoubleDropChance();
|
||||
public static final int LEAF_BLOWER_UNLOCK_LEVEL = AdvancedConfig.getInstance().getLeafBlowUnlockLevel();
|
||||
@ -30,6 +30,8 @@ public abstract class Woodcutting {
|
||||
public static final int TREE_FELLER_THRESHOLD = Config.getInstance().getTreeFellerThreshold();
|
||||
public static final boolean REQUIRES_TOOL = Config.getInstance().getWoodcuttingRequiresTool();
|
||||
|
||||
private Woodcutting() {}
|
||||
|
||||
/**
|
||||
* Begins the Tree Feller ability
|
||||
*
|
||||
@ -75,7 +77,7 @@ public abstract class Woodcutting {
|
||||
}
|
||||
|
||||
checkDoubleDrop(player, block);
|
||||
Skills.xpProcessing(player, Users.getProfile(player), SkillType.WOODCUTTING, xp);
|
||||
SkillTools.xpProcessing(player, Users.getProfile(player), SkillType.WOODCUTTING, xp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user