AutoUpdatedBossBar: don’t throw exception when cancelling twice
This commit is contained in:
parent
721175f965
commit
df34881771
@ -141,7 +141,7 @@ public class AutoUpdatedBossBar implements Listener {
|
|||||||
|
|
||||||
public synchronized void cancel() {
|
public synchronized void cancel() {
|
||||||
if (!scheduled)
|
if (!scheduled)
|
||||||
throw new IllegalStateException("Can't cancel a not scheduled bossbar update");
|
return;
|
||||||
scheduled = false;
|
scheduled = false;
|
||||||
if (timer != null) {
|
if (timer != null) {
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
|
Loading…
Reference in New Issue
Block a user