Added deployment
This commit is contained in:
parent
a88525269e
commit
65ef411116
3 changed files with 50 additions and 6 deletions
36
pom.xml
36
pom.xml
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<groupId>me.mctp</groupId>
|
<groupId>me.mctp</groupId>
|
||||||
<artifactId>MCTPAudio</artifactId>
|
<artifactId>MCTPAudio</artifactId>
|
||||||
<version>1.5</version>
|
<version>1.5-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>MCTPAudio</name>
|
<name>MCTPAudio</name>
|
||||||
|
@ -24,6 +24,13 @@
|
||||||
</pluginRepository>
|
</pluginRepository>
|
||||||
</pluginRepositories>
|
</pluginRepositories>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>nexus-snapshots</id>
|
||||||
|
<url>https://repo.sbdevelopment.tech/repository/mcthemeparks-private-snapshot/</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>clean package</defaultGoal>
|
<defaultGoal>clean package</defaultGoal>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -65,6 +72,33 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.sonatype.plugins</groupId>
|
||||||
|
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||||
|
<version>1.6.13</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-deploy</id>
|
||||||
|
<phase>deploy</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>deploy</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<serverId>nexus-snapshots</serverId>
|
||||||
|
<nexusUrl>https://repo.sbdevelopment.tech/</nexusUrl>
|
||||||
|
<skipStaging>true</skipStaging>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
|
|
|
@ -84,10 +84,12 @@ public class Playlist {
|
||||||
if (faultCounter > 4) {
|
if (faultCounter > 4) {
|
||||||
MCTPAudio.getPlugin(MCTPAudio.class).getLogger().severe("Detected to many IO errors! Stopping the radio...");
|
MCTPAudio.getPlugin(MCTPAudio.class).getLogger().severe("Detected to many IO errors! Stopping the radio...");
|
||||||
stop(); //FALLBACK! 4 errors occured.
|
stop(); //FALLBACK! 4 errors occured.
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playList.isEmpty()) {
|
if (playList.isEmpty()) {
|
||||||
start();
|
start();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get song
|
//Get song
|
||||||
|
@ -97,7 +99,7 @@ public class Playlist {
|
||||||
//Remove from PlayList
|
//Remove from PlayList
|
||||||
try {
|
try {
|
||||||
playList.remove(nextURL);
|
playList.remove(nextURL);
|
||||||
} catch (ArrayIndexOutOfBoundsException ignored) { }
|
} catch (ArrayIndexOutOfBoundsException ignored) {}
|
||||||
|
|
||||||
//Get ticks of song
|
//Get ticks of song
|
||||||
int ticks;
|
int ticks;
|
||||||
|
@ -109,7 +111,6 @@ public class Playlist {
|
||||||
embed.setColor(Color.RED);
|
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.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);
|
embed.setUrl(nextURL);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
MainUtil.sendMessageDiscord(embed);
|
MainUtil.sendMessageDiscord(embed);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -123,8 +124,17 @@ public class Playlist {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ticks == 0) {
|
if (ticks <= 0) {
|
||||||
Bukkit.getLogger().info("0 ticks");
|
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();
|
nextSong();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: MCTPAudio
|
name: MCTPAudio
|
||||||
version: ${project.version}
|
version: ${project.version}
|
||||||
main: nl.sbdeveloper.mctpaudio.MCTPAudio
|
main: nl.sbdeveloper.mctpaudio.MCTPAudio
|
||||||
api-version: 1.17
|
api-version: 1.19
|
||||||
depend: [ WorldGuard, Train_Carts ]
|
depend: [ WorldGuard, Train_Carts ]
|
||||||
authors: [ SBDeveloper ]
|
authors: [ SBDeveloper ]
|
||||||
description: The audio plugin of MCThemeParks!
|
description: The audio plugin of MCThemeParks!
|
||||||
|
|
Loading…
Add table
Reference in a new issue