diff --git a/src/main/java/net/raphimc/noteblocklib/player/SongPlayer.java b/src/main/java/net/raphimc/noteblocklib/player/SongPlayer.java index 7eafb31..b728fbf 100644 --- a/src/main/java/net/raphimc/noteblocklib/player/SongPlayer.java +++ b/src/main/java/net/raphimc/noteblocklib/player/SongPlayer.java @@ -214,7 +214,7 @@ protected void createTickTask(final long initialDelay) { */ protected void tick() { try { - if (!this.preTick()) { + if (!this.shouldTick()) { return; } try { @@ -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(); } /** @@ -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; + } + }