forked from Upstream/mmocore
Fix for case insensitivity
This commit is contained in:
parent
e90a1cea28
commit
09e1241735
@ -54,7 +54,7 @@ public class SoundObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.sound = sound;
|
this.sound = sound;
|
||||||
this.key = key;
|
this.key = key.toLowerCase();
|
||||||
|
|
||||||
volume = (float) config.getDouble("volume", 1);
|
volume = (float) config.getDouble("volume", 1);
|
||||||
pitch = (float) config.getDouble("pitch", 1);
|
pitch = (float) config.getDouble("pitch", 1);
|
||||||
@ -92,7 +92,7 @@ public class SoundObject {
|
|||||||
|
|
||||||
public void playTo(Player player, float volume, float pitch) {
|
public void playTo(Player player, float volume, float pitch) {
|
||||||
if (isCustom())
|
if (isCustom())
|
||||||
player.playSound(player.getLocation(), key.toLowerCase(), volume, pitch);
|
player.playSound(player.getLocation(), key, volume, pitch);
|
||||||
else
|
else
|
||||||
player.playSound(player.getLocation(), sound, volume, pitch);
|
player.playSound(player.getLocation(), sound, volume, pitch);
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ public class SoundObject {
|
|||||||
|
|
||||||
public void playAt(Location loc, float volume, float pitch) {
|
public void playAt(Location loc, float volume, float pitch) {
|
||||||
if (isCustom())
|
if (isCustom())
|
||||||
loc.getWorld().playSound(loc, key.toLowerCase(), volume, pitch);
|
loc.getWorld().playSound(loc, key, volume, pitch);
|
||||||
else
|
else
|
||||||
loc.getWorld().playSound(loc, sound, volume, pitch);
|
loc.getWorld().playSound(loc, sound, volume, pitch);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user