Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/main/java/net/raphimc/noteblocklib/player/SongPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ protected void createTickTask(final long initialDelay) {
*/
protected void tick() {
try {
if (!this.preTick()) {
if (!this.shouldTick()) {
return;
}
try {
Expand Down Expand Up @@ -248,8 +248,8 @@ protected void tick() {
*
* @return Whether the tick should be executed.
*/
protected boolean preTick() {
return true;
protected boolean shouldTick() {
return this.preTick();
}

/**
Expand Down Expand Up @@ -282,4 +282,15 @@ protected void onTickException(final Throwable e) {
this.stop();
}

/**
* Called before each tick (Even when paused).
*
* @return Whether the tick should be executed.
* @see #shouldTick()
*/
@Deprecated
protected boolean preTick() {
return true;
}

}