mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-03 06:57:58 +01:00
Stop timers upon quit, untested, fixes #114. Bump version number
This commit is contained in:
parent
3b394dfad7
commit
56d9b406a4
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests</artifactId>
|
||||
<version>3.0.4</version>
|
||||
<version>3.0.5</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -2534,6 +2534,14 @@ public class Quester {
|
||||
if (questData.containsKey(quest)) {
|
||||
questData.remove(quest);
|
||||
}
|
||||
if (!timers.isEmpty()) {
|
||||
for (Map.Entry<Integer, Quest> entry : timers.entrySet()) {
|
||||
if (entry.getValue().getName().equals(quest.getName())) {
|
||||
plugin.getServer().getScheduler().cancelTask(entry.getKey());
|
||||
timers.remove(entry.getKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user