Skip to content

Commit f59e9ba

Browse files
committed
Added playNextSong method to SongPlayer
1 parent e69e824 commit f59e9ba

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.xxmicloxx</groupId>
77
<artifactId>NoteBlockAPI</artifactId>
8-
<version>1.4.4</version>
8+
<version>1.4.5-SNAPSHOT</version>
99
<name>NoteBlockAPI</name>
1010

1111
<properties>

src/main/java/com/xxmicloxx/NoteBlockAPI/songplayer/SongPlayer.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,18 @@ public void playSong(int index){
724724
}
725725
}
726726

727+
/**
728+
* Start playing {@link Song} that is next in {@link Playlist} or random {@link Song} from {@link Playlist}
729+
*/
730+
public void playNextSong(){
731+
lock.lock();
732+
try {
733+
tick = song.getLength();
734+
} finally {
735+
lock.unlock();
736+
}
737+
}
738+
727739
/**
728740
* Gets the SoundCategory of this SongPlayer
729741
* @see SoundCategory

0 commit comments

Comments
 (0)