mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-18 15:18:34 +01:00
Fix occasional NPE when players quit timed quests, fixes #559
This commit is contained in:
parent
c77becce48
commit
99d4598c16
@ -701,9 +701,11 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
for (Integer timerId : quester.timers.keySet()) {
|
||||
plugin.getServer().getScheduler().cancelTask(timerId);
|
||||
if (quester.timers.containsKey(timerId)) {
|
||||
quester.timers.get(timerId).failQuest(quester);
|
||||
quester.timers.remove(timerId);
|
||||
}
|
||||
}
|
||||
|
||||
if (quester.hasData()) {
|
||||
quester.saveData();
|
||||
|
Loading…
Reference in New Issue
Block a user