Fix sounds being disabled by default

This commit is contained in:
nossr50
2019-06-16 06:46:25 -07:00
parent 726369077e
commit 5a48b568ef
6 changed files with 9 additions and 29 deletions

View File

@@ -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));

View File

@@ -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);