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,8 +701,10 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
for (Integer timerId : quester.timers.keySet()) {
|
for (Integer timerId : quester.timers.keySet()) {
|
||||||
plugin.getServer().getScheduler().cancelTask(timerId);
|
plugin.getServer().getScheduler().cancelTask(timerId);
|
||||||
quester.timers.get(timerId).failQuest(quester);
|
if (quester.timers.containsKey(timerId)) {
|
||||||
quester.timers.remove(timerId);
|
quester.timers.get(timerId).failQuest(quester);
|
||||||
|
quester.timers.remove(timerId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quester.hasData()) {
|
if (quester.hasData()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user