mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-24 01:02:00 +01:00
Reset loading value upon exception
This commit is contained in:
parent
7df3da82b3
commit
d51ce2b9ed
@ -1273,12 +1273,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
* Reload quests, actions, config settings, lang and modules, and player data
|
||||
*/
|
||||
public void reload(final ReloadCallback<Boolean> callback) {
|
||||
loading = true;
|
||||
reloadConfig();
|
||||
Bukkit.getScheduler().runTaskAsynchronously(this, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
loading = true;
|
||||
try {
|
||||
for (final Quester quester : questers) {
|
||||
quester.saveData();
|
||||
@ -1310,6 +1310,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
});
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
loading = false;
|
||||
e.printStackTrace();
|
||||
if (callback != null) {
|
||||
Bukkit.getScheduler().runTask(Quests.this, new Runnable() {
|
||||
|
Loading…
Reference in New Issue
Block a user