diff --git a/pom.xml b/pom.xml
index e47166a..795cddb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
me.mctp
MCTPAudio
- 1.5
+ 1.5-SNAPSHOT
jar
MCTPAudio
@@ -24,6 +24,13 @@
+
+
+ nexus-snapshots
+ https://repo.sbdevelopment.tech/repository/mcthemeparks-private-snapshot/
+
+
+
clean package
@@ -65,6 +72,33 @@
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ 3.0.0
+
+ true
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.13
+
+
+ default-deploy
+ deploy
+
+ deploy
+
+
+
+
+ nexus-snapshots
+ https://repo.sbdevelopment.tech/
+ true
+
+
diff --git a/src/main/java/nl/sbdeveloper/mctpaudio/radio/Playlist.java b/src/main/java/nl/sbdeveloper/mctpaudio/radio/Playlist.java
index 8e8912a..71cd325 100644
--- a/src/main/java/nl/sbdeveloper/mctpaudio/radio/Playlist.java
+++ b/src/main/java/nl/sbdeveloper/mctpaudio/radio/Playlist.java
@@ -84,10 +84,12 @@ public class Playlist {
if (faultCounter > 4) {
MCTPAudio.getPlugin(MCTPAudio.class).getLogger().severe("Detected to many IO errors! Stopping the radio...");
stop(); //FALLBACK! 4 errors occured.
+ return;
}
if (playList.isEmpty()) {
start();
+ return;
}
//Get song
@@ -97,7 +99,7 @@ public class Playlist {
//Remove from PlayList
try {
playList.remove(nextURL);
- } catch (ArrayIndexOutOfBoundsException ignored) { }
+ } catch (ArrayIndexOutOfBoundsException ignored) {}
//Get ticks of song
int ticks;
@@ -109,7 +111,6 @@ public class Playlist {
embed.setColor(Color.RED);
embed.setDescription("A song in the radio does not have MPEG headers. A song without headers cannot be played in the radio because the length cannot be determined. Please fix as soon as possible.\n\nClick on the title to go to the song.");
embed.setUrl(nextURL);
-
try {
MainUtil.sendMessageDiscord(embed);
} catch (IOException e) {
@@ -123,8 +124,17 @@ public class Playlist {
return;
}
- if (ticks == 0) {
- Bukkit.getLogger().info("0 ticks");
+ if (ticks <= 0) {
+ WebhookMessage.EmbedObject embed = new WebhookMessage.EmbedObject();
+ embed.setTitle("Radio song failure!");
+ embed.setColor(Color.RED);
+ embed.setDescription("A song in the radio does not have MPEG headers. A song without headers cannot be played in the radio because the length cannot be determined. Please fix as soon as possible.\n\nClick on the title to go to the song.");
+ embed.setUrl(nextURL);
+ try {
+ MainUtil.sendMessageDiscord(embed);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
nextSong();
return;
}
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index b09b162..ddcb010 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,7 +1,7 @@
name: MCTPAudio
version: ${project.version}
main: nl.sbdeveloper.mctpaudio.MCTPAudio
-api-version: 1.17
+api-version: 1.19
depend: [ WorldGuard, Train_Carts ]
authors: [ SBDeveloper ]
description: The audio plugin of MCThemeParks!