mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
We're now using Bukkit sounds instead of Spout sounds - only
current exception is the custom level-up sound.
This commit is contained in:
parent
20f6a55df2
commit
ac7ed67d91
@ -37,6 +37,7 @@ Version 1.4.00-dev
|
|||||||
= Fixed a bug where /party kick would trigger the PartyChangeEvent for the wrong player
|
= Fixed a bug where /party kick would trigger the PartyChangeEvent for the wrong player
|
||||||
= Fixed a bug where party join messages weren't displayed
|
= Fixed a bug where party join messages weren't displayed
|
||||||
= Fixed a bug where Disarm and Deflect had wrong values
|
= Fixed a bug where Disarm and Deflect had wrong values
|
||||||
|
! We're now using Bukkit sounds instead of Spout sounds.
|
||||||
! It is now possible to use a negative number for Max_Level in treasures.yml to not use a maximum level, changed default file accordingly
|
! It is now possible to use a negative number for Max_Level in treasures.yml to not use a maximum level, changed default file accordingly
|
||||||
! A Fishing catch will now always contains a fish even if a treasure is found
|
! A Fishing catch will now always contains a fish even if a treasure is found
|
||||||
! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent
|
! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent
|
||||||
|
@ -3,6 +3,7 @@ package com.gmail.nossr50.listeners;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
@ -17,7 +18,6 @@ import org.bukkit.event.block.BlockPistonRetractEvent;
|
|||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
import org.getspout.spoutapi.sound.SoundEffect;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||||
@ -37,7 +37,6 @@ import com.gmail.nossr50.skills.repair.Repair;
|
|||||||
import com.gmail.nossr50.skills.repair.Salvage;
|
import com.gmail.nossr50.skills.repair.Salvage;
|
||||||
import com.gmail.nossr50.skills.smelting.SmeltingManager;
|
import com.gmail.nossr50.skills.smelting.SmeltingManager;
|
||||||
import com.gmail.nossr50.skills.woodcutting.Woodcutting;
|
import com.gmail.nossr50.skills.woodcutting.Woodcutting;
|
||||||
import com.gmail.nossr50.spout.SpoutSounds;
|
|
||||||
import com.gmail.nossr50.util.BlockChecks;
|
import com.gmail.nossr50.util.BlockChecks;
|
||||||
import com.gmail.nossr50.util.ItemChecks;
|
import com.gmail.nossr50.util.ItemChecks;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
@ -293,8 +292,8 @@ public class BlockListener implements Listener {
|
|||||||
*
|
*
|
||||||
* We don't need to check permissions here because they've already been checked for the ability to even activate.
|
* We don't need to check permissions here because they've already been checked for the ability to even activate.
|
||||||
*/
|
*/
|
||||||
if (mcMMO.spoutEnabled && profile.getAbilityMode(AbilityType.TREE_FELLER) && BlockChecks.isLog(block)) {
|
if (profile.getAbilityMode(AbilityType.TREE_FELLER) && BlockChecks.isLog(block)) {
|
||||||
SpoutSounds.playSoundForPlayer(SoundEffect.FIZZ, player, block.getLocation());
|
player.playSound(block.getLocation(), Sound.FIZZ, Misc.FIZZ_VOLUME, Misc.FIZZ_PITCH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,9 +346,7 @@ public class BlockListener implements Listener {
|
|||||||
event.setInstaBreak(true);
|
event.setInstaBreak(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mcMMO.spoutEnabled) {
|
player.playSound(block.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.POP_PITCH);
|
||||||
SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (profile.getAbilityMode(AbilityType.SUPER_BREAKER) && SkillTools.triggerCheck(player, block, AbilityType.SUPER_BREAKER)) {
|
else if (profile.getAbilityMode(AbilityType.SUPER_BREAKER) && SkillTools.triggerCheck(player, block, AbilityType.SUPER_BREAKER)) {
|
||||||
MiningManager miningManager = new MiningManager(player);
|
MiningManager miningManager = new MiningManager(player);
|
||||||
|
@ -5,10 +5,10 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.getspout.spoutapi.sound.SoundEffect;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
@ -18,7 +18,6 @@ import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure;
|
|||||||
import com.gmail.nossr50.events.fake.FakePlayerAnimationEvent;
|
import com.gmail.nossr50.events.fake.FakePlayerAnimationEvent;
|
||||||
import com.gmail.nossr50.skills.SkillType;
|
import com.gmail.nossr50.skills.SkillType;
|
||||||
import com.gmail.nossr50.skills.SkillTools;
|
import com.gmail.nossr50.skills.SkillTools;
|
||||||
import com.gmail.nossr50.spout.SpoutSounds;
|
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.ModChecks;
|
import com.gmail.nossr50.util.ModChecks;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
@ -152,8 +151,6 @@ public class Excavation {
|
|||||||
Excavation.excavationProcCheck(block, player);
|
Excavation.excavationProcCheck(block, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mcMMO.spoutEnabled) {
|
player.playSound(block.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.POP_PITCH);
|
||||||
SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -146,6 +146,6 @@ public class MiningManager extends SkillManager{
|
|||||||
eventHandler.callFakeArmswing();
|
eventHandler.callFakeArmswing();
|
||||||
eventHandler.processDurabilityLoss();
|
eventHandler.processDurabilityLoss();
|
||||||
eventHandler.processDropsAndXP();
|
eventHandler.processDropsAndXP();
|
||||||
eventHandler.playSpoutSound();
|
eventHandler.playSound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
package com.gmail.nossr50.skills.mining;
|
package com.gmail.nossr50.skills.mining;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.getspout.spoutapi.sound.SoundEffect;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.events.fake.FakePlayerAnimationEvent;
|
import com.gmail.nossr50.events.fake.FakePlayerAnimationEvent;
|
||||||
import com.gmail.nossr50.skills.SkillTools;
|
import com.gmail.nossr50.skills.SkillTools;
|
||||||
import com.gmail.nossr50.spout.SpoutSounds;
|
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.ModChecks;
|
import com.gmail.nossr50.util.ModChecks;
|
||||||
|
|
||||||
@ -55,10 +54,8 @@ public class SuperBreakerEventHandler {
|
|||||||
manager.miningBlockCheck(block);
|
manager.miningBlockCheck(block);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void playSpoutSound() {
|
protected void playSound() {
|
||||||
if (mcMMO.spoutEnabled) {
|
player.playSound(block.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.POP_PITCH);
|
||||||
SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,6 +4,7 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@ -17,7 +18,6 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
|
|||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.SkillType;
|
import com.gmail.nossr50.skills.SkillType;
|
||||||
import com.gmail.nossr50.skills.SkillTools;
|
import com.gmail.nossr50.skills.SkillTools;
|
||||||
import com.gmail.nossr50.spout.SpoutSounds;
|
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.Users;
|
import com.gmail.nossr50.util.Users;
|
||||||
@ -55,9 +55,7 @@ public class Repair {
|
|||||||
SkillTools.xpProcessing(player, profile, SkillType.REPAIR, dif * 10);
|
SkillTools.xpProcessing(player, profile, SkillType.REPAIR, dif * 10);
|
||||||
|
|
||||||
//CLANG CLANG
|
//CLANG CLANG
|
||||||
if (mcMMO.spoutEnabled) {
|
player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||||
SpoutSounds.playRepairNoise(player, mcMMO.p);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -275,6 +273,7 @@ public class Repair {
|
|||||||
player.sendMessage(LocaleLoader.getString("Repair.Listener.Anvil"));
|
player.sendMessage(LocaleLoader.getString("Repair.Listener.Anvil"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.playSound(player.getLocation(), Sound.ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||||
profile.togglePlacedAnvil();
|
profile.togglePlacedAnvil();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,12 @@ package com.gmail.nossr50.skills.woodcutting;
|
|||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.TreeSpecies;
|
import org.bukkit.TreeSpecies;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.getspout.spoutapi.sound.SoundEffect;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
@ -16,7 +16,6 @@ import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
|||||||
import com.gmail.nossr50.events.fake.FakePlayerAnimationEvent;
|
import com.gmail.nossr50.events.fake.FakePlayerAnimationEvent;
|
||||||
import com.gmail.nossr50.skills.SkillType;
|
import com.gmail.nossr50.skills.SkillType;
|
||||||
import com.gmail.nossr50.skills.SkillTools;
|
import com.gmail.nossr50.skills.SkillTools;
|
||||||
import com.gmail.nossr50.spout.SpoutSounds;
|
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.ModChecks;
|
import com.gmail.nossr50.util.ModChecks;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
@ -55,9 +54,7 @@ public final class Woodcutting {
|
|||||||
public static void beginLeafBlower(Player player, Block block) {
|
public static void beginLeafBlower(Player player, Block block) {
|
||||||
mcMMO.p.getServer().getPluginManager().callEvent(new FakePlayerAnimationEvent(player));
|
mcMMO.p.getServer().getPluginManager().callEvent(new FakePlayerAnimationEvent(player));
|
||||||
|
|
||||||
if (mcMMO.spoutEnabled) {
|
player.playSound(block.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.POP_PITCH);
|
||||||
SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,19 +25,6 @@ public class SpoutSounds {
|
|||||||
soundManager.playSoundEffect(spoutPlayer, effect, location);
|
soundManager.playSoundEffect(spoutPlayer, effect, location);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Play noise on successful repair.
|
|
||||||
*
|
|
||||||
* @param player The player who repaired an item
|
|
||||||
*/
|
|
||||||
public static void playRepairNoise(Player player, mcMMO plugin) {
|
|
||||||
SoundManager soundManager = SpoutManager.getSoundManager();
|
|
||||||
SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player);
|
|
||||||
|
|
||||||
//If this is pulling from online, why have it in the jar?
|
|
||||||
soundManager.playCustomSoundEffect(plugin, spoutPlayer, "repair.wav", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Play noise on level-up.
|
* Play noise on level-up.
|
||||||
*
|
*
|
||||||
|
@ -36,6 +36,14 @@ public final class Misc {
|
|||||||
public static final int NORMAL_SKILL_ACTIVATION_CHANCE = 100;
|
public static final int NORMAL_SKILL_ACTIVATION_CHANCE = 100;
|
||||||
public static final int LUCKY_SKILL_ACTIVATION_CHANCE = 75;
|
public static final int LUCKY_SKILL_ACTIVATION_CHANCE = 75;
|
||||||
|
|
||||||
|
//Sound Pitches & Volumes from CB
|
||||||
|
public static final float ANVIL_USE_PITCH = 0.3F; // Not in CB directly, I went off the place sound values
|
||||||
|
public static final float ANVIL_USE_VOLUME = 1.0F; // Not in CB directly, I went off the place sound values
|
||||||
|
public static final float FIZZ_PITCH = 2.6F + (Misc.getRandom().nextFloat() - Misc.getRandom().nextFloat()) * 0.8F;
|
||||||
|
public static final float FIZZ_VOLUME = 0.5F;
|
||||||
|
public static final float POP_PITCH = ((getRandom().nextFloat() - getRandom().nextFloat()) * 0.7F + 1.0F) * 2.0F;
|
||||||
|
public static final float POP_VOLUME = 0.2F;
|
||||||
|
|
||||||
private Misc() {};
|
private Misc() {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user