mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-04 01:40:03 +01:00
Call password objective event on sync to prevent exception
This commit is contained in:
parent
0c4b103db6
commit
b313adff9e
@ -2615,6 +2615,7 @@ public class Quester implements Comparable<Quester> {
|
|||||||
*/
|
*/
|
||||||
public void sayPassword(final Quest quest, final AsyncPlayerChatEvent evt) {
|
public void sayPassword(final Quest quest, final AsyncPlayerChatEvent evt) {
|
||||||
final ObjectiveType type = ObjectiveType.PASSWORD;
|
final ObjectiveType type = ObjectiveType.PASSWORD;
|
||||||
|
plugin.getServer().getScheduler().runTask(plugin, () -> {
|
||||||
final QuesterPreUpdateObjectiveEvent preEvent = new QuesterPreUpdateObjectiveEvent(this, quest,
|
final QuesterPreUpdateObjectiveEvent preEvent = new QuesterPreUpdateObjectiveEvent(this, quest,
|
||||||
new Objective(type, 1, 1));
|
new Objective(type, 1, 1));
|
||||||
plugin.getServer().getPluginManager().callEvent(preEvent);
|
plugin.getServer().getPluginManager().callEvent(preEvent);
|
||||||
@ -2654,6 +2655,7 @@ public class Quester implements Comparable<Quester> {
|
|||||||
new Objective(type, 1, 1));
|
new Objective(type, 1, 1));
|
||||||
plugin.getServer().getPluginManager().callEvent(postEvent);
|
plugin.getServer().getPluginManager().callEvent(postEvent);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user