This commit is contained in:
404E 2024-03-13 23:54:49 +07:00 committed by GitHub
commit 8a0a071501
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Optional;
import java.util.logging.Level;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.bukkit.Bukkit;
@ -176,8 +177,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);
}
});
}