Make start-delay stop auto-start.
This commit is contained in:
@@ -61,15 +61,24 @@ public class StartDelayTimer extends CountdownTimer implements TimerCallback {
|
||||
|
||||
@Override
|
||||
public synchronized void start() {
|
||||
// Start auto-start-timer if arena has no start-delay
|
||||
// Start auto-start-timer if arena has no start-delay (both idempotent)
|
||||
if (super.getDuration() > 0) {
|
||||
super.start();
|
||||
} else {
|
||||
// Idempotent
|
||||
autoStartTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void stop() {
|
||||
// Stop auto-start-timer if arena has no start-delay (both idempotent)
|
||||
if (super.getDuration() > 0) {
|
||||
super.stop();
|
||||
} else {
|
||||
autoStartTimer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
internalCallback.onStart();
|
||||
|
||||
Reference in New Issue
Block a user