mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 20:45:28 +02:00
Fix sounds being disabled by default
This commit is contained in:
@@ -73,24 +73,6 @@ public final class ParticleEffectUtils {
|
||||
livingEntity.getWorld().playEffect(livingEntity.getEyeLocation(), Effect.MOBSPAWNER_FLAMES, 1);
|
||||
}
|
||||
|
||||
public static void playAbilityEnabledEffect(Player player) {
|
||||
if (!MainConfig.getInstance().getAbilityActivationEffectEnabled()) {
|
||||
}
|
||||
|
||||
/* if (hasHeadRoom(player)) {
|
||||
fireworkParticleShower(player, Color.GREEN);
|
||||
}*/
|
||||
}
|
||||
|
||||
public static void playAbilityDisabledEffect(Player player) {
|
||||
if (!MainConfig.getInstance().getAbilityDeactivationEffectEnabled()) {
|
||||
}
|
||||
|
||||
/*if (hasHeadRoom(player)) {
|
||||
fireworkParticleShower(player, Color.RED);
|
||||
}*/
|
||||
}
|
||||
|
||||
/* public static void fireworkParticleShower(Player player, Color color) {
|
||||
Location location = player.getLocation();
|
||||
location.setY(location.getY() + (player.isInsideVehicle() ? 1.0 : -1.0));
|
||||
|
@@ -31,6 +31,8 @@ import java.util.List;
|
||||
|
||||
public class SkillUtils {
|
||||
|
||||
public static final int ENCHANT_SPEED_VAR = 5;
|
||||
|
||||
public static void applyXpGain(McMMOPlayer mcMMOPlayer, PrimarySkillType skill, float xp, XPGainReason xpGainReason) {
|
||||
mcMMOPlayer.beginXpGain(skill, xp, xpGainReason, XPGainSource.SELF);
|
||||
}
|
||||
@@ -162,7 +164,7 @@ public class SkillUtils {
|
||||
}
|
||||
|
||||
itemLore.add("mcMMO Ability Tool");
|
||||
itemMeta.addEnchant(Enchantment.DIG_SPEED, efficiencyLevel + AdvancedConfig.getInstance().getEnchantBuff(), true);
|
||||
itemMeta.addEnchant(Enchantment.DIG_SPEED, efficiencyLevel + ENCHANT_SPEED_VAR, true);
|
||||
|
||||
itemMeta.setLore(itemLore);
|
||||
heldItem.setItemMeta(itemMeta);
|
||||
@@ -227,10 +229,10 @@ public class SkillUtils {
|
||||
if (itemLore.remove("mcMMO Ability Tool")) {
|
||||
int efficiencyLevel = item.getEnchantmentLevel(Enchantment.DIG_SPEED);
|
||||
|
||||
if (efficiencyLevel <= AdvancedConfig.getInstance().getEnchantBuff()) {
|
||||
if (efficiencyLevel <= ENCHANT_SPEED_VAR) {
|
||||
itemMeta.removeEnchant(Enchantment.DIG_SPEED);
|
||||
} else {
|
||||
itemMeta.addEnchant(Enchantment.DIG_SPEED, efficiencyLevel - AdvancedConfig.getInstance().getEnchantBuff(), true);
|
||||
itemMeta.addEnchant(Enchantment.DIG_SPEED, efficiencyLevel - ENCHANT_SPEED_VAR, true);
|
||||
}
|
||||
|
||||
itemMeta.setLore(itemLore);
|
||||
|
Reference in New Issue
Block a user