mirror of
https://github.com/PikaMug/Quests.git
synced 2024-09-09 14:08:02 +02: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) {
|
||||
final ObjectiveType type = ObjectiveType.PASSWORD;
|
||||
plugin.getServer().getScheduler().runTask(plugin, () -> {
|
||||
final QuesterPreUpdateObjectiveEvent preEvent = new QuesterPreUpdateObjectiveEvent(this, quest,
|
||||
new Objective(type, 1, 1));
|
||||
plugin.getServer().getPluginManager().callEvent(preEvent);
|
||||
@ -2654,6 +2655,7 @@ public class Quester implements Comparable<Quester> {
|
||||
new Objective(type, 1, 1));
|
||||
plugin.getServer().getPluginManager().callEvent(postEvent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user