Skip to content

Commit 447419e

Browse files
authored
Renamed SongPlayer#preTick to SongPlayer#shouldTick (#33)
* Refactored preTick to shouldTick * Added newline
1 parent 5fe361d commit 447419e

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

src/main/java/net/raphimc/noteblocklib/player/SongPlayer.java

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ protected void createTickTask(final long initialDelay) {
214214
*/
215215
protected void tick() {
216216
try {
217-
if (!this.preTick()) {
217+
if (!this.shouldTick()) {
218218
return;
219219
}
220220
try {
@@ -248,8 +248,8 @@ protected void tick() {
248248
*
249249
* @return Whether the tick should be executed.
250250
*/
251-
protected boolean preTick() {
252-
return true;
251+
protected boolean shouldTick() {
252+
return this.preTick();
253253
}
254254

255255
/**
@@ -282,4 +282,15 @@ protected void onTickException(final Throwable e) {
282282
this.stop();
283283
}
284284

285+
/**
286+
* Called before each tick (Even when paused).
287+
*
288+
* @return Whether the tick should be executed.
289+
* @see #shouldTick()
290+
*/
291+
@Deprecated
292+
protected boolean preTick() {
293+
return true;
294+
}
295+
285296
}

0 commit comments

Comments
 (0)