mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Remove sound adapter
This commit is contained in:
@ -1,8 +1,13 @@
|
||||
package com.gmail.nossr50.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.runnables.items.ChimaeraWingWarmup;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.skills.CombatUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -10,15 +15,8 @@ import org.bukkit.inventory.ShapelessRecipe;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.runnables.items.ChimaeraWingWarmup;
|
||||
import com.gmail.nossr50.util.adapter.SoundAdapter;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.skills.CombatUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public final class ChimaeraWing {
|
||||
private static McMMOPlayer mcMMOPlayer;
|
||||
@ -133,7 +131,7 @@ public final class ChimaeraWing {
|
||||
mcMMOPlayer.setTeleportCommenceLocation(null);
|
||||
|
||||
if (Config.getInstance().getChimaeraSoundEnabled()) {
|
||||
player.playSound(location, SoundAdapter.BAT_TAKEOFF, Misc.BAT_VOLUME, Misc.BAT_PITCH);
|
||||
player.playSound(location, Sound.ENTITY_BAT_TAKEOFF, Misc.BAT_VOLUME, Misc.BAT_PITCH);
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Pass"));
|
||||
|
@ -3,7 +3,6 @@ package com.gmail.nossr50.util;
|
||||
import com.gmail.nossr50.commands.skills.AprilCommand;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.adapter.SoundAdapter;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
@ -358,7 +357,7 @@ public final class HolidayManager {
|
||||
|
||||
public void levelUpApril(Player player, FakeSkillType fakeSkillType) {
|
||||
int levelTotal = Misc.getRandom().nextInt(1 + UserManager.getPlayer(player).getSkillLevel(SkillType.MINING)) + 1;
|
||||
player.playSound(player.getLocation(), SoundAdapter.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
|
||||
player.sendMessage(ChatColor.YELLOW + StringUtils.getCapitalized(fakeSkillType.toString()) + " skill increased by 1. Total (" + levelTotal + ")");
|
||||
ParticleEffectUtils.fireworkParticleShower(player, ALL_COLORS.get(Misc.getRandom().nextInt(ALL_COLORS.size())));
|
||||
}
|
||||
|
@ -1,91 +0,0 @@
|
||||
package com.gmail.nossr50.util.adapter;
|
||||
|
||||
import org.bukkit.Sound;
|
||||
|
||||
public class SoundAdapter {
|
||||
public static final Sound FIZZ;
|
||||
public static final Sound LEVEL_UP;
|
||||
public static final Sound FIREWORK_BLAST_FAR;
|
||||
public static final Sound ITEM_PICKUP;
|
||||
public static final Sound GHAST_SCREAM;
|
||||
public static final Sound ANVIL_LAND;
|
||||
public static final Sound ANVIL_USE;
|
||||
public static final Sound ITEM_BREAK;
|
||||
public static final Sound BAT_TAKEOFF;
|
||||
|
||||
static {
|
||||
Sound temp = null;
|
||||
try {
|
||||
temp = Sound.valueOf("BLOCK_FIRE_EXTINGUISH");
|
||||
} catch (Exception e) {
|
||||
temp = Sound.valueOf("FIZZ");
|
||||
} finally {
|
||||
FIZZ = temp;
|
||||
}
|
||||
temp = null;
|
||||
try {
|
||||
temp = Sound.valueOf("ENTITY_PLAYER_LEVELUP");
|
||||
} catch (Exception e) {
|
||||
temp = Sound.valueOf("LEVEL_UP");
|
||||
} finally {
|
||||
LEVEL_UP = temp;
|
||||
}
|
||||
temp = null;
|
||||
try {
|
||||
temp = Sound.valueOf("ENTITY_GHAST_SCREAM");
|
||||
} catch (Exception e) {
|
||||
temp = Sound.valueOf("GHAST_SCREAM");
|
||||
} finally {
|
||||
GHAST_SCREAM = temp;
|
||||
}
|
||||
temp = null;
|
||||
try {
|
||||
temp = Sound.valueOf("ENTITY_ITEM_PICKUP");
|
||||
} catch (Exception e) {
|
||||
temp = Sound.valueOf("ITEM_PICKUP");
|
||||
} finally {
|
||||
ITEM_PICKUP = temp;
|
||||
}
|
||||
temp = null;
|
||||
try {
|
||||
temp = Sound.valueOf("ENTITY_ITEM_BREAK");
|
||||
} catch (Exception e) {
|
||||
temp = Sound.valueOf("ITEM_BREAK");
|
||||
} finally {
|
||||
ITEM_BREAK = temp;
|
||||
}
|
||||
temp = null;
|
||||
try {
|
||||
temp = Sound.valueOf("BLOCK_ANVIL_USE");
|
||||
} catch (Exception e) {
|
||||
temp = Sound.valueOf("ANVIL_USE");
|
||||
} finally {
|
||||
ANVIL_USE = temp;
|
||||
}
|
||||
temp = null;
|
||||
try {
|
||||
temp = Sound.valueOf("BLOCK_ANVIL_LAND");
|
||||
} catch (Exception e) {
|
||||
temp = Sound.valueOf("ANVIL_LAND");
|
||||
} finally {
|
||||
ANVIL_LAND = temp;
|
||||
}
|
||||
temp = null;
|
||||
try {
|
||||
temp = Sound.valueOf("ENTITY_BAT_TAKEOFF");
|
||||
} catch (Exception e) {
|
||||
temp = Sound.valueOf("BAT_TAKEOFF");
|
||||
} finally {
|
||||
BAT_TAKEOFF = temp;
|
||||
}
|
||||
temp = null;
|
||||
try {
|
||||
temp = Sound.valueOf("ENTITY_FIREWORK_BLAST_FAR");
|
||||
} catch (Exception e) {
|
||||
temp = Sound.valueOf("FIREWORK_LARGE_BLAST2");
|
||||
} finally {
|
||||
FIREWORK_BLAST_FAR = temp;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user