mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-22 09:08:03 +01:00
modifying exception handling for completeSetup, now it will print the log and stack traces together
This commit is contained in:
parent
cbed9ac831
commit
c2bf481767
@ -2,6 +2,7 @@ package world.bentobox.bentobox;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -174,8 +175,15 @@ public class BentoBox extends JavaPlugin implements Listener {
|
||||
try {
|
||||
completeSetup(loadTime);
|
||||
} catch (Exception e) {
|
||||
fireCriticalError(e.getMessage(), "");
|
||||
e.printStackTrace();
|
||||
getLogger().log(Level.WARNING,
|
||||
"unexpected exception occurred during completeSetup, Disabling BentoBox...", e);
|
||||
// Do not save players or islands, just shutdown
|
||||
shutdown = true;
|
||||
// Stop all addons
|
||||
if (addonsManager != null) {
|
||||
addonsManager.disableAddons();
|
||||
}
|
||||
instance.setEnabled(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user