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