mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
You can now turn off sound effects used by mcMMO
This commit is contained in:
parent
11461cc220
commit
b42b4cadbe
@ -61,4 +61,10 @@ public class SoundConfig extends AutoUpdateConfigLoader {
|
||||
String key = "Sounds."+soundType.toString()+".Pitch";
|
||||
return (float) config.getDouble(key);
|
||||
}
|
||||
|
||||
public boolean getIsEnabled(SoundType soundType)
|
||||
{
|
||||
String key = "Sounds."+soundType.toString()+".Enabled";
|
||||
return config.getBoolean(key, true);
|
||||
}
|
||||
}
|
||||
|
@ -15,22 +15,27 @@ public class SoundManager {
|
||||
*/
|
||||
public static void sendSound(Player player, Location location, SoundType soundType)
|
||||
{
|
||||
if(SoundConfig.getInstance().getIsEnabled(soundType))
|
||||
player.playSound(location, getSound(soundType), SoundCategory.MASTER, getVolume(soundType), getPitch(soundType));
|
||||
}
|
||||
|
||||
public static void sendCategorizedSound(Player player, Location location, SoundType soundType, SoundCategory soundCategory)
|
||||
{
|
||||
if(SoundConfig.getInstance().getIsEnabled(soundType))
|
||||
player.playSound(location, getSound(soundType), soundCategory, getVolume(soundType), getPitch(soundType));
|
||||
}
|
||||
|
||||
public static void sendCategorizedSound(Player player, Location location, SoundType soundType, SoundCategory soundCategory, float pitchModifier)
|
||||
{
|
||||
float totalPitch = Math.min(2.0F, (getPitch(soundType) + pitchModifier));
|
||||
|
||||
if(SoundConfig.getInstance().getIsEnabled(soundType))
|
||||
player.playSound(location, getSound(soundType), soundCategory, getVolume(soundType), totalPitch);
|
||||
}
|
||||
|
||||
public static void worldSendSound(World world, Location location, SoundType soundType)
|
||||
{
|
||||
if(SoundConfig.getInstance().getIsEnabled(soundType))
|
||||
world.playSound(location, getSound(soundType), getVolume(soundType), getPitch(soundType));
|
||||
}
|
||||
|
||||
|
@ -5,44 +5,58 @@ Sounds:
|
||||
# 0.0 = No Volume
|
||||
MasterVolume: 1.0
|
||||
ANVIL:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
Pitch: 0.3
|
||||
#Fizz, Pop, and Kraken make use of a adding and multiplying random numbers together to make a unique pitch everytime they are heard
|
||||
FIZZ:
|
||||
Enable: true
|
||||
Volume: 0.5
|
||||
LEVEL_UP:
|
||||
Enable: true
|
||||
Volume: 0.75
|
||||
Pitch: 0.5
|
||||
ITEM_BREAK:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
Pitch: 1.0
|
||||
#Fizz, Pop, and Kraken make use of a adding and multiplying random numbers together to make a unique pitch everytime they are heard
|
||||
POP:
|
||||
Enable: true
|
||||
Volume: 0.2
|
||||
#Fizz, Pop, and Kraken make use of a adding and multiplying random numbers together to make a unique pitch everytime they are heard
|
||||
KRAKEN:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
CHIMAERA_WING:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
Pitch: 0.6
|
||||
ROLL_ACTIVATED:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
Pitch: 0.7
|
||||
SKILL_UNLOCKED:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
Pitch: 1.4
|
||||
DEFLECT_ARROWS:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
Pitch: 2.0
|
||||
TOOL_READY:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
Pitch: 0.4
|
||||
ABILITY_ACTIVATED_GENERIC:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
Pitch: 0.1
|
||||
ABILITY_ACTIVATED_BERSERK:
|
||||
Enable: true
|
||||
Volume: 0.5
|
||||
Pitch: 1.7
|
||||
TIRED:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
Pitch: 1.7
|
Loading…
Reference in New Issue
Block a user