mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 03:04:44 +02:00
I *think* this should be backwards compatible, I may be wrong and it could break both.
This commit is contained in:
@ -61,6 +61,7 @@ import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.ItemUtils;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.adapter.SoundAdapter;
|
||||
import com.gmail.nossr50.util.skills.CombatUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
@ -122,7 +123,7 @@ public class FishingManager extends SkillManager {
|
||||
world.strikeLightningEffect(location);
|
||||
world.strikeLightningEffect(location);
|
||||
|
||||
world.playSound(location, Sound.ENTITY_GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||
world.playSound(location, SoundAdapter.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||
mcMMO.p.getServer().broadcastMessage(ChatColor.RED + AdvancedConfig.getInstance().getServerUnleashMessage().replace("(PLAYER)", player.getDisplayName()));
|
||||
}
|
||||
else {
|
||||
@ -130,7 +131,7 @@ public class FishingManager extends SkillManager {
|
||||
world.createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);
|
||||
world.createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);
|
||||
|
||||
player.playSound(location, Sound.ENTITY_GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||
player.playSound(location, SoundAdapter.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||
}
|
||||
|
||||
if (player.getItemInHand().getType() == Material.FISHING_ROD) {
|
||||
|
@ -26,6 +26,7 @@ import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.adapter.SoundAdapter;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class RepairManager extends SkillManager {
|
||||
@ -51,7 +52,7 @@ public class RepairManager extends SkillManager {
|
||||
}
|
||||
|
||||
if (Config.getInstance().getRepairAnvilPlaceSoundsEnabled()) {
|
||||
player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
player.playSound(player.getLocation(), SoundAdapter.ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
}
|
||||
|
||||
togglePlacedAnvil();
|
||||
@ -145,7 +146,7 @@ public class RepairManager extends SkillManager {
|
||||
|
||||
// BWONG BWONG BWONG
|
||||
if (Config.getInstance().getRepairAnvilUseSoundsEnabled()) {
|
||||
player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
player.playSound(player.getLocation(), SoundAdapter.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
}
|
||||
|
||||
// Repair the item!
|
||||
|
@ -23,6 +23,7 @@ import com.gmail.nossr50.skills.salvage.salvageables.Salvageable;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.adapter.SoundAdapter;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class SalvageManager extends SkillManager {
|
||||
@ -48,7 +49,7 @@ public class SalvageManager extends SkillManager {
|
||||
}
|
||||
|
||||
if (Config.getInstance().getSalvageAnvilPlaceSoundsEnabled()) {
|
||||
player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
player.playSound(player.getLocation(), SoundAdapter.ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
}
|
||||
|
||||
togglePlacedAnvil();
|
||||
@ -112,8 +113,8 @@ public class SalvageManager extends SkillManager {
|
||||
|
||||
// BWONG BWONG BWONG - CLUNK!
|
||||
if (Config.getInstance().getSalvageAnvilUseSoundsEnabled()) {
|
||||
player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_ITEM_BREAK, 1.0F, 1.0F);
|
||||
player.playSound(player.getLocation(), SoundAdapter.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
player.playSound(player.getLocation(), SoundAdapter.ITEM_BREAK, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Salvage.Skills.Success"));
|
||||
|
@ -28,6 +28,7 @@ import com.gmail.nossr50.util.BlockUtils;
|
||||
import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.adapter.SoundAdapter;
|
||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
@ -89,7 +90,7 @@ public class SmeltingManager extends SkillManager {
|
||||
blockState.setType(Material.AIR);
|
||||
|
||||
if (Config.getInstance().getFluxPickaxeSoundEnabled()) {
|
||||
player.playSound(blockState.getLocation(), Sound.BLOCK_FIRE_EXTINGUISH, Misc.FIZZ_VOLUME, Misc.getFizzPitch());
|
||||
player.playSound(blockState.getLocation(), SoundAdapter.FIZZ, Misc.FIZZ_VOLUME, Misc.getFizzPitch());
|
||||
}
|
||||
|
||||
ParticleEffectUtils.playFluxEffect(blockState.getLocation());
|
||||
|
@ -31,6 +31,7 @@ import com.gmail.nossr50.skills.SkillManager;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.adapter.SoundAdapter;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
@ -333,7 +334,7 @@ public class TamingManager extends SkillManager {
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Taming.Summon.Complete") + lifeSpan);
|
||||
player.playSound(location, Sound.ENTITY_FIREWORK_BLAST_FAR, 1F, 0.5F);
|
||||
player.playSound(location, SoundAdapter.FIREWORK_BLAST_FAR, 1F, 0.5F);
|
||||
}
|
||||
|
||||
private boolean rangeCheck(EntityType type) {
|
||||
|
@ -11,6 +11,7 @@ import org.bukkit.scheduler.BukkitRunnable;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.adapter.SoundAdapter;
|
||||
import com.gmail.nossr50.util.skills.CombatUtils;
|
||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
||||
|
||||
@ -35,7 +36,7 @@ public class TrackedTamingEntity extends BukkitRunnable {
|
||||
public void run() {
|
||||
if (livingEntity.isValid()) {
|
||||
Location location = livingEntity.getLocation();
|
||||
location.getWorld().playSound(location, Sound.BLOCK_FIRE_EXTINGUISH, 0.8F, 0.8F);
|
||||
location.getWorld().playSound(location, SoundAdapter.FIZZ, 0.8F, 0.8F);
|
||||
ParticleEffectUtils.playCallOfTheWildEffect(livingEntity);
|
||||
CombatUtils.dealDamage(livingEntity, livingEntity.getMaxHealth(), DamageCause.SUICIDE, livingEntity);
|
||||
}
|
||||
|
Reference in New Issue
Block a user