File tree Expand file tree Collapse file tree
src/main/java/net/raphimc/noteblocklib/player Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ public Song getSong() {
117117
118118 /**
119119 * Sets the song that should be played.<br>
120- * Can be called in {@link #onFinished ()}.
120+ * Can be called in {@link #onSongFinished ()}.
121121 *
122122 * @param song The song to play.
123123 */
@@ -226,8 +226,7 @@ protected void tick() {
226226
227227 this .tick ++;
228228 if (this .tick >= this .song .getNotes ().getLengthInTicks ()) {
229- this .stop ();
230- this .onFinished ();
229+ this .onSongFinished ();
231230 return ;
232231 }
233232 if (this .ticksPerSecond != this .song .getTempoEvents ().getEffectiveTempo (this .tick )) {
@@ -262,7 +261,9 @@ protected boolean shouldTick() {
262261 /**
263262 * Called when the song has finished playing.
264263 */
265- protected void onFinished () {
264+ protected void onSongFinished () {
265+ this .stop ();
266+ this .onFinished ();
266267 }
267268
268269 /**
@@ -293,4 +294,13 @@ protected boolean preTick() {
293294 return true ;
294295 }
295296
297+ /**
298+ * Called when the song has finished playing.
299+ *
300+ * @see #onSongFinished()
301+ */
302+ @ Deprecated
303+ protected void onFinished () {
304+ }
305+
296306}
You can’t perform that action at this time.
0 commit comments