aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2021-03-21 21:52:02 -0400
committerbowser0000 <bowser0000@gmail.com>2021-03-21 21:52:02 -0400
commitc63fa1b2d1c2c3b8704337f7908e4dd18bbc1733 (patch)
treef40228dbe22f05ca2123124a74a544ccf62aac02
parent4ab6601c074b9486e4c656d577d86079d9b47916 (diff)
downloadSkyblockMod-c63fa1b2d1c2c3b8704337f7908e4dd18bbc1733.tar.gz
SkyblockMod-c63fa1b2d1c2c3b8704337f7908e4dd18bbc1733.tar.bz2
SkyblockMod-c63fa1b2d1c2c3b8704337f7908e4dd18bbc1733.zip
Fix custom music file on non-windows operating systems
-rw-r--r--README.md10
-rw-r--r--src/main/java/me/Danker/features/CustomMusic.java5
2 files changed, 5 insertions, 10 deletions
diff --git a/README.md b/README.md
index 6f484d7..a2f0227 100644
--- a/README.md
+++ b/README.md
@@ -93,14 +93,8 @@ Discord Server: https://discord.gg/QsEkNQS
- Start/Stop Skill Tracker - Numpad 5 by default.
## Custom Music
-- Supported audio formats:
- - .wav
- - .mid
- - .aiff
- - .au
- - .rmf
-- For the following custom music, place a supported music file with the given name in the `.minecraft/config/dsmmusic` folder.
- - Dungeon boss music: `dungeonboss`
+- To use custom music, place a music file with the given name in the `.minecraft/config/dsmmusic` folder and enable the custom song in /dsm.
+ - Dungeon boss music: `dungeonboss.wav`
### Notes
- Slayer tracker for token drops and 20% chance drops uses a 12x12x12 bounding box centered on the player to detect the drops. If you are out of the range of the item drop, it will not count on the tracker.
diff --git a/src/main/java/me/Danker/features/CustomMusic.java b/src/main/java/me/Danker/features/CustomMusic.java
index d2d6b6f..3c411d8 100644
--- a/src/main/java/me/Danker/features/CustomMusic.java
+++ b/src/main/java/me/Danker/features/CustomMusic.java
@@ -85,13 +85,14 @@ public class CustomMusic {
public static void init(String configDirectory) throws IOException, LineUnavailableException, UnsupportedAudioFileException {
if (configDirectory == null) return;
- File directory = new File(configDirectory + "\\dsmmusic");
+ File directory = new File(configDirectory + "/dsmmusic");
if (!directory.exists()) directory.mkdir();
reset();
dungeonboss = AudioSystem.getClip();
- File dungeonBossFile = new File(configDirectory + "\\dsmmusic\\dungeonboss.wav");
+ File dungeonBossFile = new File(configDirectory + "/dsmmusic/dungeonboss.wav");
+ System.out.println("dungeonboss.wav exists?: " + dungeonBossFile.exists());
if (dungeonBossFile.exists()) {
AudioInputStream ais = AudioSystem.getAudioInputStream(dungeonBossFile);
dungeonboss.open(ais);