mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
Config overhaul part 7
This commit is contained in:
@ -131,7 +131,7 @@ public class Excavation {
|
||||
* @param block The block to check
|
||||
*/
|
||||
public static void gigaDrillBreaker(Player player, Block block) {
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), Config.abilityDurabilityLoss);
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), Config.getAbilityToolDamage());
|
||||
|
||||
if (!block.hasMetadata("mcmmoPlacedBlock")) {
|
||||
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
||||
|
@ -216,7 +216,7 @@ public class Mining {
|
||||
public static void SuperBreakerBlockCheck(Player player, Block block) {
|
||||
Material type = block.getType();
|
||||
int tier = m.getTier(player.getItemInHand());
|
||||
int durabilityLoss = Config.abilityDurabilityLoss;
|
||||
int durabilityLoss = Config.getAbilityToolDamage();
|
||||
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
||||
|
||||
switch (type) {
|
||||
|
@ -80,7 +80,7 @@ public class Skills {
|
||||
* @param skill The skill the ability is tied to
|
||||
*/
|
||||
public static void activationCheck(Player player, SkillType skill) {
|
||||
if (Config.enableOnlyActivateWhenSneaking && !player.isSneaking()) {
|
||||
if (Config.getAbilitiesOnlyActivateWhenSneaking() && !player.isSneaking()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ public class Skills {
|
||||
}
|
||||
}
|
||||
|
||||
if (Config.enableAbilityMessages) {
|
||||
if (Config.getAbilityMessagesEnabled()) {
|
||||
player.sendMessage(tool.getRaiseTool());
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ public class Skills {
|
||||
* @param durabilityLoss The durability to remove from the item
|
||||
*/
|
||||
public static void abilityDurabilityLoss(ItemStack inhand, int durabilityLoss) {
|
||||
if (Config.toolsLoseDurabilityFromAbilities) {
|
||||
if (Config.getAbilitiesDamageTools()) {
|
||||
if (!inhand.containsEnchantment(Enchantment.DURABILITY)) {
|
||||
inhand.setDurability((short) (inhand.getDurability() + durabilityLoss));
|
||||
}
|
||||
|
@ -315,8 +315,8 @@ public class WoodCutting {
|
||||
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
|
||||
if (Config.woodcuttingrequiresaxe) {
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), Config.abilityDurabilityLoss);
|
||||
if (Config.getWoodcuttingRequiresTool()) {
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), Config.getAbilityToolDamage());
|
||||
}
|
||||
|
||||
if (Config.spoutEnabled) {
|
||||
@ -329,7 +329,7 @@ public class WoodCutting {
|
||||
for (Block x : toBeFelled) {
|
||||
if (x.getType().equals(Material.LOG)) {
|
||||
durabilityLoss++;
|
||||
durabilityLoss = durabilityLoss + Config.abilityDurabilityLoss;
|
||||
durabilityLoss = durabilityLoss + Config.getAbilityToolDamage();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user