Fixed issue #880 related to a casting issue.

This commit is contained in:
Ka0rX 2023-06-25 22:18:16 +01:00
parent 3f0ca4856e
commit 4a45f7abb3

View File

@ -36,7 +36,8 @@ public class SoundObject {
}
this.sound = sound;
this.key = key.toLowerCase();
this.key = key != null ? key.toLowerCase() : null;
volume = split.length > 1 ? Float.parseFloat(split[1]) : 1;
pitch = split.length > 2 ? Float.parseFloat(split[2]) : 1;
@ -54,7 +55,7 @@ public class SoundObject {
}
this.sound = sound;
this.key = key.toLowerCase();
this.key = key != null ? key.toLowerCase() : null;
volume = (float) config.getDouble("volume", 1);
pitch = (float) config.getDouble("pitch", 1);