1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-02-18 05:11:32 +01:00

Lets catch exceptions on shutdown in case there is issue with that

This commit is contained in:
Zrips 2018-12-25 22:47:08 +02:00
parent d9a48b5b97
commit f7a5980a9e

View File

@ -874,13 +874,31 @@ public class Jobs extends JavaPlugin {
@Override
public void onDisable() {
GUIManager.CloseInventories();
shopManager.CloseInventories();
dao.saveExplore();
dao.saveBlockProtection();
FurnaceBrewingHandling.save();
try {
GUIManager.CloseInventories();
} catch (Exception e) {
e.printStackTrace();
}
try {
shopManager.CloseInventories();
} catch (Exception e) {
e.printStackTrace();
}
try {
dao.saveExplore();
} catch (Exception e) {
e.printStackTrace();
}
try {
dao.saveBlockProtection();
} catch (Exception e) {
e.printStackTrace();
}
try {
FurnaceBrewingHandling.save();
} catch (Exception e) {
e.printStackTrace();
}
shutdown();
consoleMsg("&e[Jobs] &2Plugin has been disabled successfully.");
setEnabled(false);