mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-03 15:08:10 +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>
|
<groupId>me.blackvein.quests</groupId>
|
||||||
<artifactId>quests</artifactId>
|
<artifactId>quests</artifactId>
|
||||||
<version>3.0.4</version>
|
<version>3.0.5</version>
|
||||||
<name>quests</name>
|
<name>quests</name>
|
||||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
@ -2534,6 +2534,14 @@ public class Quester {
|
|||||||
if (questData.containsKey(quest)) {
|
if (questData.containsKey(quest)) {
|
||||||
questData.remove(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) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user