mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Removed unnecessary calls
This commit is contained in:
parent
b9bf3f96d2
commit
0545ed434d
@ -128,7 +128,7 @@ public class Excavation {
|
|||||||
if (player == null)
|
if (player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Skills.abilityDurabilityLoss(player.getItemInHand(), Config.getInstance().getAbilityToolDamage());
|
Skills.abilityDurabilityLoss(player.getItemInHand(), Misc.toolDurabilityLoss);
|
||||||
|
|
||||||
if (!mcMMO.placeStore.isTrue(block) && Misc.blockBreakSimulate(block, player, true)) {
|
if (!mcMMO.placeStore.isTrue(block) && Misc.blockBreakSimulate(block, player, true)) {
|
||||||
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
||||||
|
@ -492,7 +492,7 @@ public class WoodCutting {
|
|||||||
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||||
|
|
||||||
if (Config.getInstance().getWoodcuttingRequiresTool()) {
|
if (Config.getInstance().getWoodcuttingRequiresTool()) {
|
||||||
Skills.abilityDurabilityLoss(player.getItemInHand(), Config.getInstance().getAbilityToolDamage());
|
Skills.abilityDurabilityLoss(player.getItemInHand(), Misc.toolDurabilityLoss);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mcMMO.spoutEnabled) {
|
if (mcMMO.spoutEnabled) {
|
||||||
@ -505,7 +505,7 @@ public class WoodCutting {
|
|||||||
for (Block x : toBeFelled) {
|
for (Block x : toBeFelled) {
|
||||||
if (Misc.getRandom().nextInt(level + 1) > 0) {}//Don't add durabilityLoss, because Unbreaking enchantment does it's work.
|
if (Misc.getRandom().nextInt(level + 1) > 0) {}//Don't add durabilityLoss, because Unbreaking enchantment does it's work.
|
||||||
else if (x.getType().equals(Material.LOG) || (Config.getInstance().getBlockModsEnabled() && ModChecks.isCustomLogBlock(x))) {
|
else if (x.getType().equals(Material.LOG) || (Config.getInstance().getBlockModsEnabled() && ModChecks.isCustomLogBlock(x))) {
|
||||||
durabilityLoss = durabilityLoss + Config.getInstance().getAbilityToolDamage();
|
durabilityLoss += Misc.toolDurabilityLoss;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user