9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-19 15:09:24 +00:00

Cancel on unload

This commit is contained in:
Daniel Zhang
2024-07-31 22:29:47 +08:00
parent e07ade7c8b
commit 43fa9d7534

View File

@@ -81,6 +81,8 @@ public class BukkitCompetitionManager implements CompetitionManager {
this.timerCheckTask.cancel();
if (currentCompetition != null && currentCompetition.isOnGoing())
this.currentCompetition.stop(true);
if (this.redisPlayerCount != null)
this.redisPlayerCount.cancel();
this.commandConfigMap.clear();
this.timeConfigMap.clear();
}
@@ -91,7 +93,8 @@ public class BukkitCompetitionManager implements CompetitionManager {
if (currentCompetition != null && currentCompetition.isOnGoing())
this.currentCompetition.stop(false);
if (this.redisPlayerCount != null)
this.commandConfigMap.clear();
this.redisPlayerCount.cancel();
this.commandConfigMap.clear();
this.timeConfigMap.clear();
}